[Gc] Re: Effective heap utilization

Ludovic Courtès ludovic.courtes at laas.fr
Wed Oct 10 06:35:22 PDT 2007


Hi,

"Bruce Hoult" <bruce at hoult.org> writes:

> The simplest idea is to do a GC_dump() and look at the number of mark
> bits set in each heap block compared to the possible number of objects
> in that block (the blocksize divided by the size of objects in that
> block).

Good idea.  I used the attached Scheme script to parse the line produced
by `GC_dump ()' (or `GC_DUMP_REGULARLY') showing the blocks in use.

With a libgc-based Guile running a small program creating lots of
garbage, I get a total-to-alive heap ratio of 1.03, which seems pretty
good (I believe there were no uncollectable objects).

Thanks!

Ludovic.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: +parse-gc-dump-marks.scm
Type: text/x-scheme
Size: 1449 bytes
Desc: The script
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20071010/ae468700/parse-gc-dump-marks.bin


More information about the Gc mailing list