<div dir="ltr">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?</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/29 Jussi Piitulainen <span dir="ltr"><<a href="mailto:jpiitula@ling.helsinki.fi" target="_blank">jpiitula@ling.helsinki.fi</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear list,<br>
<br>
is there a way to monitor Gambit's memory usage inside a program? I<br>
know about the documented (gc-report-set! #t) and the apparently<br>
undocumented (##gc), but I don't seem to get access to that report,<br>
and I was unable to find other ways to access such information.<br>
<br>
This is where I gave up (in gsi v4.6.7):<br>
<br>
> (parameterize ((current-error-port (current-output-port)))<br>
     (with-output-to-string '() ##gc))<br>
*** GC: 1 ms, 427K alloc, 1.08M heap, 48.9K live (4% 26056+24056)<br>
""<br>
<br>
That is, the ##gc report bypasses current-error-port and I only get to<br>
see the report on the screen.<br>
<br>
I'm trying to get some empirical evidence that a certain API does not<br>
leak memory. Those ##gc reports might be adequate on the Gambit side<br>
as is, but I would still like to know if there is some way to access<br>
this information inside the test program. Any pointers?<br>
<br>
_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
</blockquote></div><br></div>