[gambit-list] Garbage Collection BlackMagic

Marc Feeley feeley at iro.umontreal.ca
Tue Jun 23 03:34:22 EDT 2009


On 23-Jun-09, at 2:53 AM, lowly coder wrote:

> Does Gambit have a counter for "number of live, non-still objects?"  
> Essentially this is what I need to minimize now, and being able to  
> benchmark it will be helpful.

Try running gsi -:d2 .  It will give you GC reports of the form:

*** GC: 1 ms, 30.7M alloc, 199K heap, 41.1K live (21% 27144+14936)

In parentheses you have the number of bytes allocated for movable  
objects and for nonmovable objects (still and permanent).

You can also get this information by calling (##process-statistics).   
The last two numbers in the vector are the number of bytes allocated  
for movable objects and for nonmovable objects.  For details look for  
the call to ##process-statistics in the file lib/_nonstd.scm .

Marc




More information about the Gambit-list mailing list