Inserting safe memory reuse commands into ML-like programs

  • Authors:
  • Oukseh Lee;Hongseok Yang;Kwangkeun Yi

  • Affiliations:
  • Dept. of Computer Science, Research on Program Analysis System, Korea Advanced Institute of Science and Technology;Dept. of Computer Science, Research on Program Analysis System, Korea Advanced Institute of Science and Technology;Dept. of Computer Science, Research on Program Analysis System, Korea Advanced Institute of Science and Technology

  • Venue:
  • SAS'03 Proceedings of the 10th international conference on Static analysis
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a static analysis that estimates reusable memory cells and a source-level transformation that adds explicit memory-reuse commands into the program text. For benchmark ML programs, our analysis and transformation achieves the memory reuse ratio from 5.2% to 91.3%. The small-ratio cases are for programs that have too prevalent sharings among memory cells. For other cases, our experimental results are encouraging in terms of accuracy and cost. Major features of our analysis are: (1) poly-variant analysis of functions by parameterization for the argument heap cells; (2) use of multiset formulas in expressing the sharings and partitionings of heap cells; (3) deallocations conditioned by dynamic flags that are passed as extra arguments to functions; (4) individual heap cell as the granularity of explicit memory-free. Our analysis and transformation is fully automatic.