[gambit-list] Roundup after memory leak hunt.
mikael.rcv at gmail.com
Sun Jun 23 17:11:16 EDT 2013
Spent some days hunting memory leaks, completely resolved and now working.
Here's the roundup:
* Found two ways to track this kind of problems:
* Print out current-thread's backtrace at garbage collect. If lots of
objects or stack frames are being allocated unintendedly, you'll learn lots
about that from the backtrace at gc time, for the thread that was running
when the gc trigged.
* Locate objects that don't collect and find their roots
with ##resolve-referencing-objects . Get hold of their references in the
first place using object->serial-number and ##serial-number-to-object-table
* Don't do this:
* (will-execute! (make-will your-object (lambda (v) (void)))) , that
will will never GC. I guess it's a bug.
* (output-port-timeout-set! port timeout (lambda () (close-port port)
#f)), if the port had data left to drain that creates an infinite recursion
up to heap overflow.
* ##thread-continuation-capture, in the currently latest commit
ffd839c64f66278cdb4cce5ef86316ee290a4204 it leaks. Fix below.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gambit-list