[Gc] What kind of GC to use.
hans.boehm at hp.com
Mon Dec 6 10:10:30 PST 2004
This mailing list is really specific to what's become known as the
"Boehm-Demers-Weiser" GC. For more general questions, you are generally
better off posting to gclist at iecc.com. I copied this message there.
Having said that, you are pointing out a well-known issue. With
most garbage collectors, you really want the heap memory-resident.
If you can't do that, there are various techniques to reduce the
- Avoid touching pointer-free objects during GC. (Probably worthwhile
anyway, for cache reasons. We do that.)
- Possibly (partially) sort addresses during marking. (Helps, but probably
only by a factor of two or so. We used to do that, but a factor of two
for rarely encountered situations didn't seem worth the substantial
other problems this causes, even if you do it adaptively based on page
- Generational GC can help quite a bit.
- You can do quite a bit better with cooperation from the VM manager.
Symbolics machines used to do that. Emery Berger has done some recent
work in this area.
I'm not sure how reference counting compares in this respect. I suspect
it is heavily dependent on implementation details and the application.
"Classical" reference counting potentially touches an awful lot of extra
memory during pointer updates, but that can be avoided.
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of Bart van der Werf
> Sent: Sunday, December 05, 2004 5:47 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] What kind of GC to use.
> I wrote my own little Mark and Sweep GC and im noticing that it is
> causing loads of pagefaults.
> Would refcounting give me better performance ?
> Memory is basicly used as a drive and virtual memory cache for me.
> (Not closing programs when i dont use them for example)
> grtz, bart
> Bart van der Werf (Bluelive)
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc