David Hanley <[EMAIL PROTECTED]> writes: > I noticed my heap was growing every time i compiled & > loaded my program. > > I looked for a programmatic leak--pushing conses to > some global stack, etc. Didn't find such. > > I tried making a little toy program: > > (defun this(x)(+ x x)) > (defun that(x)(- x x)) > (defun the-other(x)(* x x)) > > I compiled it an wrote a loop that loads the binary > over and over. > > The heap grows with every GC!
Have you tried calling GC explicitly at the end? I.e. try (ext:gc :full t) which should remove most garbage. The garbage will also be automatically removed in due course, calling GC with :full t explicitly just speeds up that process. That said, doing 11000 loads of the file, I only reach 1MB used heap, which seems very minor, given that people don't usually add 33000 function definitions to a running image in a short space of time. Regs, Pierre. -- Pierre R. Mai <[EMAIL PROTECTED]> http://www.pmsf.de/pmai/ The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents. -- Nathaniel Borenstein
