• Media type: Electronic Conference Proceeding; E-Article; Text
  • Title: Efficient Memory Management for Modelica Simulations
  • Contributor: Scuttari, Michele [Author]; Camillucci, Nicola [Author]; Cattaneo, Daniele [Author]; Terraneo, Federico [Author]; Agosta, Giovanni [Author]
  • imprint: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022
  • Language: English
  • DOI: https://doi.org/10.4230/OASIcs.PARMA-DITAM.2022.7
  • Keywords: Modelica ; memory management ; modeling & simulation ; garbage collection
  • Origination:
  • Footnote: Diese Datenquelle enthält auch Bestandsnachweise, die nicht zu einem Volltext führen.
  • Description: The ever increasing usage of simulations in order to produce digital twins of physical systems led to the creation of specialized equation-based modeling languages such as Modelica. However, compilers of such languages often generate code that exploits the garbage collection memory management paradigm, which introduces significant runtime overhead. In this paper we explain how to improve the memory management approach of the automatically generated simulation code. This is achieved by addressing two different aspects. One regards the reduction of the heap memory usage, which is obtained by modifying functions whose resulting arrays could instead be allocated on the stack by the caller. The other aspect regards the possibility of avoiding garbage collection altogether by performing all memory lifetime tracking statically. We implement our approach in a prototype Modelica compiler, achieving an improvement of the memory management overhead of over 10 times compared to a garbage collected solution, and an improvement of 56 times compared to the production-grade compiler OpenModelica.
  • Access State: Open Access