[Gc] Heap size and stop-the-world collections

Lothar Scholz scholz at scriptolutions.com
Wed Jul 12 04:01:59 PDT 2006


Hello LudovicCourtès,

Wednesday, July 12, 2006, 11:09:47 AM, you wrote:


L> 2. In my example, there is not much to be collected since only a few
L>    bytes are allocated and discarded in each iteration of the loop while
L>    the vast majority of the heap remains untouched.  However, the GC
L>    ends up doing a large number of stop-the-world collections,
L>    apparently marking and sweeping the _whole_ heap even though just a
L>    tiny part of it is changing.


The reason is that the gc is not a generational collector. It's a very
simple stop-mark-sweep implementation.

-- 
Best regards,
 Lothar Scholz                mailto:scholz at scriptolutions.com



More information about the Gc mailing list