Memory used during GC
David Detlefs - Sun Microsystems Labs BOS <[email protected]> Thu, 13 Jan 2005 19:00:32 -0500
| Newsgroups | gmane.comp.programming.garbage-collection.general |
|---|---|
| Message-ID | <[email protected]> |
Calum -- Another approach that we use in a couple of places in Sun collectors is to allocate a fixed size stack to hold references to grey objects. If this stack overflows, record that fact, and at the end of marking restart the marking process, traversing the heap to find marked objects, treating them as roots. This process will eventually terminate. With even quite small stacks relative to total heap size, you can make this overflow quite unlikely (for "reasonable" programs that don't have very long pointer chains.) Hope this is useful... -- ============================================= AntiSpamString: nix flubber now ============================================================================= Dave Detlefs http://www.sunlabs.com/people/detlefs/ Sun Microsystems Laboratories [email protected] 1 Network Drive, Burlington, MA 01803-0902 (781)-442-0841