Messages in this thread | | | From | Bernd Eckenfels <> | Subject | OT: Java GC (was: Garbage Collection and Swap) | Date | Wed, 14 Jul 2004 00:47:56 +0200 |
| |
In article <40F45DEF.8060307@techsource.com> you wrote: > I get the impression that the Java VM, for instance, knows what > variables are pointers (well, references) and only considers those. It > also knows every object that has even been allocated. It scans over > every pointer it knows about (the "mark" phase), and then it scans over > every dynamically allocated memory block (the "sweep" phase) and removes > all that have no references.
Well, most VM implementations use an generative aproach, where fresh objects are kept in a smaller hot pool and aged out (nursery), expecting less traversal. It is not enough to keep the marks in a central location with pointers, since you have actually follow those pointers into the object and travers the graphs.
http://java.sun.com/products/hotspot/whitepaper.html#5d
Greetings Bernd -- eckes privat - http://www.eckes.org/ Project Freefire - http://www.freefire.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |