Automatic garbage collection relieves programmers from the burden of managing memory themselves and several techniques have been developed that make garbage collection feasible in many situations, including real time applications or within traditional programming languages. However optimal performance cannot always be achieved by a uniform general purpose solution. Sometimes an algorithm exhibits a predictable pattern of memory usage that could be better handled specifically, delaying as much as possible the intervention of the general purpose collector. This leads to the requirement for algorithm specific customisation of the collector strategies. We present a dynamic memory management framework which can be customised to the needs of an algorithm, while preserving the convenience of automatic collection in the normal case. The Customisable Memory Management (CMM) organizes memory in multiple heaps. Each heap is defined as a C++ class which encapsulates a particular storage discipline. The default heap for collectable objects uses the technique of mostly copying garbage collection, providing good performance and memory compaction. Customisation of the collector is achieved exploiting object orientation by defining specialised versions of the collector methods for each heap class. The object oriented interface to the collector enables coexistence and coordination among the various collector as well as integration with traditional code unaware of garbage collection. The CMM is implemented in C++ without any special support in the language or the compiler. The techniques used in the CMM are general enough to be applicable also to other languages.
[1]
Hans-Juergen Boehm,et al.
Garbage collection in an uncooperative environment
,
1988,
Softw. Pract. Exp..
[2]
Daniel R. Edelson.
Precompiling C++ for Garbage Collection
,
1992,
IWMM.
[3]
Brian A. Wichmann,et al.
Rationale for the design of the Ada programming language
,
1979,
SIGP.
[4]
ZornBenjamin.
The measured cost of conservative garbage collection
,
1993
.
[5]
Benjamin G. Zorn,et al.
The measured cost of conservative garbage collection
,
1993,
Softw. Pract. Exp..
[6]
Paul R. Wilson,et al.
Uniprocessor Garbage Collection Techniques
,
1992,
IWMM.
[7]
E. P. Wentworth.
Pitfalls of conservative garbage collection
,
1990,
Softw. Pract. Exp..
[8]
B. Buchberger,et al.
Grobner Bases : An Algorithmic Method in Polynomial Ideal Theory
,
1985
.
[9]
John R. Ellis,et al.
Safe, Efficient Garbage Collection for C++
,
1994,
C++ Conference.
[10]
Daniel R. Edelson.
A mark-and-sweep collector C++
,
1992,
POPL '92.
[11]
A. Dain Samples.
GC-cooperative C++
,
1992,
IWMM.
[12]
WeiserMark,et al.
Garbage collection in an uncooperative environment
,
1988
.
[13]
David L. Detlefs,et al.
Concurrent garbage collection for C
,
1990
.
[14]
Joel F. Bartlett,et al.
Compacting garbage collection with ambiguous roots
,
1988,
LIPO.
[15]
David A. Moon,et al.
The Lisp Machine manual
,
1981,
SGAR.