<div dir="ltr"><div><div><div>thanks Guillaume!<br><br></div>this is a great start for me -- i am helping fare debug a memory leak, and it's really hard to identify <br>without dumping the heap to see what kind of object is leaking.  <br><br></div></div>-- vyzo<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 1, 2018 at 2:46 PM, Guillaume Cartier <span dir="ltr"><<a href="mailto:gcartier@jazzscheme.org" target="_blank">gcartier@jazzscheme.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Marc you wrote 2 pieces of code:</div><div><br></div><div>- a heap walker: ##walk-object!</div><div>- a function to copy recursively an object to a new memory zone (STILL, PERMANENT, ...): ##copy-object</div><div><br></div><div>you also wrote a small test function: test-walk at the end of the file to showcase those</div><div><br></div><div>The goal for me was to move large pieces of stable memory (classes for example) to PERMANENT memory so as to diminish the pressure on the garbage collector in the video game I'm writing. I ended up not using it in the game as I was never able to make it work correctly due to the complexities of the structures I wanted to copy.</div><div><br></div>The implementation is available here: <a href="https://github.com/jazzscheme/jazz/blob/master/lib/gambit.walk/src/gambit/walk/implementation.scm" target="_blank">https://github.com/<wbr>jazzscheme/jazz/blob/master/<wbr>lib/gambit.walk/src/gambit/<wbr>walk/implementation.scm</a>. Dimitri, just remove the surrounding (unit protected gambit.walk.implementation ...) expression to get pure Gambit code.<div><br></div><div>Note that Gambit 4.8.8 broke some pieces of the code. See the ;; fix gambit 4.8.8 undefined warnings comments throughout the code (should not be too hard to fix I think).</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Guillaume</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 31, 2018 at 9:23 AM, Dimitris Vyzovitis <span dir="ltr"><<a href="mailto:vyzo@hackzen.org" target="_blank">vyzo@hackzen.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>awesome, thank you!<br><br></div>-- vyzo<br></div><div class="m_-1852854577848414117HOEnZb"><div class="m_-1852854577848414117h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 31, 2018 at 4:03 PM, Guillaume Cartier <span dir="ltr"><<a href="mailto:gcartier@jazzscheme.org" target="_blank">gcartier@jazzscheme.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes Marc wrote some very nice code to explore the Gambit heap programmaticaly that I use in my projects. I'll refresh myself on the code and post it in a Gambit friendly format shortly.<div><br></div><div>Guillaume</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-1852854577848414117m_5402006009840009229h5">On Wed, Jan 31, 2018 at 8:08 AM, Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-1852854577848414117m_5402006009840009229h5">Yes I remember helping Guillaume Cartier develop a procedure to do this.  Perhaps he can help you with that.<br>
<br>
Marc<br>
<br>
<br>
<br>
> On Jan 29, 2018, at 1:00 PM, Dimitris Vyzovitis <<a href="mailto:vyzo@hackzen.org" target="_blank">vyzo@hackzen.org</a>> wrote:<br>
><br>
> Is there a reasonable way to dump the live heap?<br>
> It could help a lot with debugging memory leaks.<br>
><br>
> -- vyzo<br>
<br></div></div>
______________________________<wbr>_________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://webmail.iro.umontreal.<wbr>ca/mailman/listinfo/gambit-lis<wbr>t</a><br>
<br>
</blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>