[gambit-list] Monitoring memory usage inside Gambit?

Guillaume Cartier gcartier at jazzscheme.org
Tue Oct 29 14:41:25 EDT 2013

All those memory reports internally use ##process-statistics to get the

The source code of ##process-statistics should give you a good idea of the

      ___F64VECTORSET(result,___FIX(7),___bytes_allocated ())

On Tue, Oct 29, 2013 at 4:41 AM, Jussi Piitulainen <
jpiitula at ling.helsinki.fi> wrote:

> Dear list,
> is there a way to monitor Gambit's memory usage inside a program? I
> know about the documented (gc-report-set! #t) and the apparently
> undocumented (##gc), but I don't seem to get access to that report,
> and I was unable to find other ways to access such information.
> This is where I gave up (in gsi v4.6.7):
> > (parameterize ((current-error-port (current-output-port)))
>      (with-output-to-string '() ##gc))
> *** GC: 1 ms, 427K alloc, 1.08M heap, 48.9K live (4% 26056+24056)
> ""
> That is, the ##gc report bypasses current-error-port and I only get to
> see the report on the screen.
> I'm trying to get some empirical evidence that a certain API does not
> leak memory. Those ##gc reports might be adequate on the Gambit side
> as is, but I would still like to know if there is some way to access
> this information inside the test program. Any pointers?
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://webmail.iro.umontreal.ca/pipermail/gambit-list/attachments/20131029/9a36772d/attachment.html 

More information about the Gambit-list mailing list