Implementation of the promise smob

2010-08-19 Thread Abhijeet More
Hi, I noticed that the implementation of the "promise" smob did not have any "mark" function defined. This smob does contain a couple of other SCM objects. Can someone explain how these objects are not cleared up by the gc (since nobody marks them as live)? Thanks Abhijeet

Re: Possible Memory Leak with stream-for-each

2010-08-11 Thread Abhijeet More
On Sat, Jul 31, 2010 at 4:16 PM, Abhijeet More wrote: > Andy, > Thanks! That's a great answer! > I'll see what I can do with these guidelines. Apologies - I haven't had a chance yet to look into using the libgc library as you suggested. Would it be possible to use va

Re: Possible Memory Leak with stream-for-each

2010-07-31 Thread Abhijeet More
On Sat, Jul 31, 2010 at 7:48 AM, Andy Wingo wrote: [snip] > To really track this down we need a heap profiler. To make a heap > profiler, we need to hack libgc. libgc has some of the things we need > already, but some are only present in debug builds, which is > ridiculous -- one should always h

Re: Possible Memory Leak with stream-for-each

2010-07-29 Thread Abhijeet More
On Mon, Jul 26, 2010 at 5:36 AM, Andy Wingo wrote: > > I think it's probably our bug, but I haven't had time to examine it > thoroughly. FWIW - I tried using the SRFI-45 reference implementation for delay and force (as-is from the SRFI reference implementation) and got the same behavior. To debu

Re: Possible Memory Leak with stream-for-each

2010-07-24 Thread Abhijeet More
On Sat, Jul 24, 2010 at 12:32 PM, Abhijeet More wrote: > > I don't think so. The leak described in SRFI-45 is due to a naive > implementation of stream-filter on SICP-like streams (odd or even). > SRFI-45 describes a way to implement streams so that the leak does not >

Re: Possible Memory Leak with stream-for-each

2010-07-24 Thread Abhijeet More
On Sat, Jul 24, 2010 at 12:13 PM, Ludovic Courtès wrote: > Hi! > > The leak you describe seems to be that depicted under “Why the space > leak occurs” at . > > Am I right? I don't think so. The leak described in SRFI-45 is due to a naive implementati

Possible Memory Leak with stream-for-each

2010-07-19 Thread Abhijeet More
Hi All, I've been trying to use streams as defined in SICP using guile. A little googling showed that an implementation had already been suggested here: http://lists.gnu.org/archive/html/guile-user/2001-04/msg00220.html However, when I use this to iterate through the stream I see that guile's memo