[gambit-list] Monitoring memory usage inside Gambit?

Mikael mikael.rcv at gmail.com
Tue Oct 29 13:20:08 EDT 2013

Check the source for ##gc-report-set! and where its' registered for
calledback post-gc and get a copy of that data. Did that clarify it?

2013/10/29 Jussi Piitulainen <jpiitula at ling.helsinki.fi>

> 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/42dcad27/attachment.html 

More information about the Gambit-list mailing list