[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible Memory Leak with stream-for-each
From: |
Tibi Turbureanu |
Subject: |
Re: Possible Memory Leak with stream-for-each |
Date: |
Mon, 2 Aug 2010 06:29:05 +0300 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Hello guys,
On Sat, Jul 31, 2010 at 01:48:27PM +0200, Andy Wingo wrote:
> So, it's not the case that the beginning of the stream was being held on
> to. Which is a bad thing -- it means that somehow something in the
> middle was being held on to.
Andy, I remember you said at GHM that we might not use libgc correctly.
Related to this, I found some tips in README.QUICK:
[quote]
Replace calls to malloc by calls to GC_MALLOC, and calls to realloc
by calls to GC_REALLOC.
Define GC_DEBUG before including gc.h for additional checking.
[\quote]
We also have GC_malloc_* calls in Guile and maybe we should have only
GC_MALLOC_* calls so that the debugging mode can work (just defining
GC_DEBUG before including gc.h gives a segfault).
There is also a warning:
[quote]
Do not store the only pointer to an object in memory allocated
with system malloc, since the collector usually does not scan
memory allocated in this way.
[/quote]
But I haven't studied the code yet to tell if we respect this.
What do you guys think?
Tibi
- Re: Possible Memory Leak with stream-for-each,
Tibi Turbureanu <=