Proceedings of the 11th international ACM SIGPLAN conference on Principles and practice of declarative programming pages:161-169
International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming edition:11 location:Coimbra, Portugal date:7-9 September 2009
Dividing the heap memory of programs into regions is
the starting point of region-based memory management.
In our existing work of
enabling region-based memory management for Mercury,
a program analysis was used to distribute data over the regions.
An important goal of the analysis is to decide
which program variables should end up in the same region.
For a popular class of programs,
it covetously puts program variables in the same region,
while more memory could have been reused
if they had been kept in separate ones.
In this paper we define a new refined region analysis
that is keen to keep program variables in separate regions
by taking into account the different execution paths of a procedure.
With the more precise, path-sensitive analysis we
can reduce the memory footprint for several programs.