RE: What kind of GC to use.
"Boehm, Hans" <[email protected]> Mon, 6 Dec 2004 10:10:30 -0800
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc,gmane.comp.programming.garbage-collection.general |
|---|---|
| Message-ID | <65953E8166311641A685BDF71D865826058BA3@cacexc12.americas.cpqcorp.net> |
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 [email protected] 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 problem: - 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 fault rates.) - 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. Hans > -----Original Message----- > From: gc-bounces-o/PNRNCSakrWxDs0y9d3MAC/[email protected] > [mailto:gc-bounces-o/PNRNCSakrWxDs0y9d3MAC/[email protected]]On Behalf Of Bart van der Werf > (Bluelive) > Sent: Sunday, December 05, 2004 5:47 AM > To: gc-o/PNRNCSakrWxDs0y9d3MAC/[email protected] > 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) > http://pluk.sf.net/ > irc://irc.freenode.org/pluk > > > _______________________________________________ > Gc mailing list > Gc-V9/[email protected] > http://www.hpl.hp.com/hosted/linux/mail-archives/gc/ >