[clean-list] Next Heap Size Factor ?

John van Groningen johnvg@cs.kun.nl
Fri, 24 Nov 2000 16:39:14 +0000


Fabien Todescato wrote:
>If I am not mistaken, then, the standard garbage collector is a two-space
>moving copying garbage-collector.

Yes, but only if the amount of heap in use is smaller than about a quarter
of the maximum heap size. If it is larger, a two pass sliding compacting
collector is used.

>For my personal information, what about the optional mark-scan garbage
>collector ? I think I have read somewhere that it is a sliding compactor, is
>that indeed the case ?

The optional mark-scan garbage collector initially uses a non copying mark-scan
collector. It just traverses the heap and marks used areas of the heap in a
bit vector. When memory is allocated, this bit vector is scanned to find
a (aligned) block of memory of at least 256 bytes.

If the heap becomes too fragmented the two pass sliding compactor garbage
collector is used in stead to compact the heap again.

For more information see my paper "Optimising Mark-Scan garbage collection"
available from:

http://www.cs.kun.nl/~clean/Research/publications/publications.html

(1995, number 10)

Best regards,

John van Groningen