<div dir="ltr">All those memory reports internally use ##process-statistics to get the information.<div><br></div><div>The source code of ##process-statistics should give you a good idea of the fields:</div><div><br></div>
<div>...</div><div><div>      ___F64VECTORSET(result,___FIX(0),user)</div><div>      ___F64VECTORSET(result,___FIX(1),sys)</div><div>      ___F64VECTORSET(result,___FIX(2),real)</div><div>      ___F64VECTORSET(result,___FIX(3),___GSTATE->gc_user_time)</div>
<div>      ___F64VECTORSET(result,___FIX(4),___GSTATE->gc_sys_time)</div><div>      ___F64VECTORSET(result,___FIX(5),___GSTATE->gc_real_time)</div><div>      ___F64VECTORSET(result,___FIX(6),___GSTATE->nb_gcs)</div>
<div>      ___F64VECTORSET(result,___FIX(7),___bytes_allocated ())</div><div>      ___F64VECTORSET(result,___FIX(8),(2*(1+2)<<___LWS))</div><div>      ___F64VECTORSET(result,___FIX(9),n)</div><div>      ___F64VECTORSET(result,___FIX(10),minflt)</div>
<div>      ___F64VECTORSET(result,___FIX(11),majflt)</div><div>      ___F64VECTORSET(result,___FIX(12),___GSTATE->last_gc_user_time)</div><div>      ___F64VECTORSET(result,___FIX(13),___GSTATE->last_gc_sys_time)</div>
<div>      ___F64VECTORSET(result,___FIX(14),___GSTATE->last_gc_real_time)</div><div>      ___F64VECTORSET(result,___FIX(15),___GSTATE->last_gc_heap_size)</div><div>      ___F64VECTORSET(result,___FIX(16),___GSTATE->last_gc_alloc)</div>
<div>      ___F64VECTORSET(result,___FIX(17),___GSTATE->last_gc_live)</div><div>      ___F64VECTORSET(result,___FIX(18),___GSTATE->last_gc_movable)</div><div>      ___F64VECTORSET(result,___FIX(19),___GSTATE->last_gc_nonmovable)</div>
</div><div>...</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 29, 2013 at 4:41 AM, Jussi Piitulainen <span dir="ltr"><<a href="mailto:jpiitula@ling.helsinki.fi" target="_blank">jpiitula@ling.helsinki.fi</a>></span> wrote:<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>
<br>
</blockquote></div><br></div>