[gambit-list] ReĄG Regarding garbage collection

David Rush kumoyuki at gmail.com
Wed Sep 9 05:36:04 EDT 2009

2009/9/9 peter lo <peter19852001 at yahoo.com.hk>:
> I am compiling a number of scm files as .o files and load them dynamically into the REPL, is it possible that this is causing the problem?

Not likely.

> I will check my program more closely to see if there are any parts that is holding too much memory.
> As for the possibility of memory leaks, this puzzles me. In a language with garbage collection, what does it mean to have memory leaks?

Exactly what you said yourself. Code that inadvertantly keeps memory
around. Heavy use of symbols (in the sense of memoized strings) is
probably the easiest way to leak memory. Just about anything that is
linked to a a global data structure is a good candidate for leaking

If the garbage collector thinks your program could possibly ever use a
piece of memory again, it will not free that memory. The collector is
way more conservative than your brain, so it is certainly possible to
fool yourself about whether or not you *intend*  to use data when you
have in fact kept it around.

david rush
GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt

More information about the Gambit-list mailing list