[gambit-list] Dumping the heap
gcartier at jazzscheme.org
Thu Feb 1 07:46:19 EST 2018
Marc you wrote 2 pieces of code:
- a heap walker: ##walk-object!
- a function to copy recursively an object to a new memory zone (STILL,
PERMANENT, ...): ##copy-object
you also wrote a small test function: test-walk at the end of the file to
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.
The implementation is available here:
Dimitri, just remove the surrounding (unit protected
gambit.walk.implementation ...) expression to get pure Gambit code.
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).
On Wed, Jan 31, 2018 at 9:23 AM, Dimitris Vyzovitis <vyzo at hackzen.org>
> awesome, thank you!
> -- vyzo
> On Wed, Jan 31, 2018 at 4:03 PM, Guillaume Cartier <
> gcartier at jazzscheme.org> wrote:
>> 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.
>> On Wed, Jan 31, 2018 at 8:08 AM, Marc Feeley <feeley at iro.umontreal.ca>
>>> Yes I remember helping Guillaume Cartier develop a procedure to do
>>> this. Perhaps he can help you with that.
>>> > On Jan 29, 2018, at 1:00 PM, Dimitris Vyzovitis <vyzo at hackzen.org>
>>> > Is there a reasonable way to dump the live heap?
>>> > It could help a lot with debugging memory leaks.
>>> > -- vyzo
>>> Gambit-list mailing list
>>> Gambit-list at iro.umontreal.ca
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gambit-list