[gclist] Hybrid GC/explicit MMGs?

Michael Hicks mwh at cs.umd.edu
Wed Jun 30 04:05:35 PDT 2004


The Boehm-Demers-Weiser (BDW) conservative collector permits you to
manually free objects using GC_free().  Thus, you have the choice to
either let the GC get it, or to do it yourself.  Of course, if you start
freeing things manually without any enforced discipline, you open
yourself to the possibility of a dangling pointer, so the safety
guarantee of GC goes out the window.

In Cyclone, a C-like but type-safe language, we use static analysis in
the compiler to ensure that uses of GC_free will not lead to a dangling
pointer.  We have found that reducing the frequency of GC by using
manual deallocation can have a significant benefit on memory
consumption, but very often there is no benefit to elapsed time.  We
have a paper describing our system and some of our experience; if you're
interested you can see a preprint at
http://www.cs.umd.edu/~mwh/papers/hicks04experience.html.  Any comments
on this work are most welcome.

Mike

-----Original Message-----
From: owner-gclist at lists.iecc.com [mailto:owner-gclist at lists.iecc.com]
On Behalf Of Florian Liekweg
Sent: Wednesday, June 30, 2004 6:16 AM
To: gclist at iecc.com
Subject: [gclist] Hybrid GC/explicit MMGs?

Hi,

the unpredictability of GC runs, be it real or percieved, got me
thinking about the possibility of hybrid system that allows
explicit freeing of ojbects (possibly prematurely so, with the
obvious consequences) and provides garbage collection.  Wouldn't
it be nice to say, "Now is a good time to clean up manually" ...

Besides the more obvious questions (given address 0xbfbff054, should
GC free it, or will the program free it?  Should GC take precedence?
Should explicit free'ing be in command?), I'm wondering whether two
such systems can even co-exist behind the same process (who gets to
do the next brk?  Is that my page or your page?)

Does anyone know about any system that has addressed (sic) this problem
or provides a similar approach?  Any thoughts why this may be possible,
impossible or possible-but-only-with-significant-overhead?

Note, if replies come in via PM, I'll post a summary.

Cheers,
Florian
-- 



More information about the GClist mailing list