How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

Standish P stndshp at gmail.com
Tue Aug 17 14:20:11 EDT 2010


On Aug 17, 1:17 am, torb... at diku.dk (Torben Ægidius Mogensen) wrote:
> Standish P <stnd... at gmail.com> writes:
> > [Q] How far can stack [LIFO] solve do automatic garbage collection and
> > prevent memory leak ?
>
> > Because a stack has push and pop, it is able to release and allocate
> > memory. We envisage an exogenous stack which has malloc() associated
> > with a push and free() associated with a pop.
>
> See

How many programmers have applied the ideas of these papers in their
programming practice ? I paste the abstract for convenience

> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.23.5498

Abstract:
This paper describes a memory management discipline for programs that
perform dynamic memory allocation and de-allocation. At runtime, all
values are put into regions. The store consists of a stack of regions.
All points of region allocation and deallocation are inferred
automatically, using a type and effect based program analysis. The
scheme does not assume the presence of a garbage collector. The scheme
was first presented by Tofte and Talpin (1994); subsequently, it has
been tested in The ML Kit with Regions, a region-based, garbage-
collection free implementation of the Standard ML Core language, which
includes recursive datatypes, higher-order functions and updatable
references (Birkedal et al. 96, Elsman and Hallenberg 95). This paper
defines a region-based dynamic semantics for a skeletal programming
language extracted from Standard ML. We present the inference system
which specifies where regions can be allocated and de-allocated and a
detailed proof that the system is sound wi...

>
> http://portal.acm.org/citation.cfm?doid=174675.177855

ABSTRACT
We present a translation scheme for the polymorphically typed call-by-
value &lgr;-calculus. All runtime values, including function closures,
are put into regions. The store consists of a stack of regions. Region
inference and effect inference are used to infer where regions can be
allocated and de-allocated. Recursive functions are handled using a
limited form of polymorphic recursion. The translation is proved
correct with respect to a store semantics, which models as a region-
based run-time system. Experimental results suggest that regions tend
to be small, that region allocation is frequent and that overall
memory demands are usually modest, even without garbage collection.

>
> http://www.springerlink.com/content/m2074884n6gt612h/
>

Abstract
We report on our experience with designing, implementing, proving
correct, and evaluating a region-based memory management system.
dynamic storage management - regions - Standard ML



>         Torben




More information about the Python-list mailing list