Stream-filter and space leaks Phil Bewig (20 Feb 2003 14:08 UTC)
Re: Stream-filter and space leaks Richard Kelsey (20 Feb 2003 18:41 UTC)
Re: Stream-filter and space leaks Phil Bewig (21 Feb 2003 09:57 UTC)
Re: Stream-filter and space leaks Richard Kelsey (21 Feb 2003 23:18 UTC)
Re: Stream-filter and space leaks sperber@xxxxxx (21 Feb 2003 10:04 UTC)
Re: Stream-filter and space leaks Richard Kelsey (21 Feb 2003 15:06 UTC)
Re: Stream-filter and space leaks Matthias Neubauer (25 Feb 2003 16:01 UTC)
Re: Stream-filter and space leaks Richard Kelsey (25 Feb 2003 18:25 UTC)
Re: Stream-filter and space leaks Matthias Neubauer (25 Feb 2003 21:32 UTC)
Re: Stream-filter and space leaks Richard Kelsey (25 Feb 2003 22:11 UTC)
Re: Stream-filter and space leaks sperber@xxxxxx (26 Feb 2003 08:18 UTC)
Re: Stream-filter and space leaks Matthias Neubauer (26 Feb 2003 13:31 UTC)
Re: Stream-filter and space leaks sperber@xxxxxx (11 Mar 2003 14:58 UTC)
Re: Stream-filter and space leaks Matthias Neubauer (19 Mar 2003 15:27 UTC)
Re: Stream-filter and space leaks felix (22 Mar 2003 09:49 UTC)
Re: Stream-filter and space leaks felix (22 Mar 2003 09:56 UTC)

Re: Stream-filter and space leaks sperber@xxxxxx 21 Feb 2003 10:04 UTC

>>>>> "RK" == Richard Kelsey <xxxxxx@s48.org> writes:

RK>    From: Phil Bewig <xxxxxx@swbell.net>
RK>    Date: Thu, 20 Feb 2003 15:08:05 +0100

RK>    Stream-filter and
RK>    the various stream-drop functions leak space if they are not implemented
RK>    properly, something that is hard to do.  In fact, in a private e-mail
RK>    yesterday someone pointed out another space leak involving stream-filter
RK>    (they were also kind enough to show how to fix it).

RK> Comparing the new version of STREAM-FILTER with the one in the proposed SRFI,
RK> it appears that this latest space leak could be fixed by including your own
RK> versions of DELAY and FORCE in the sample implementation, using one where forcing
RK> a stream caused it to stop retaining the generating thunk.  You could merge this
RK> delay into the STREAM record:

The code you posted seems to be essentially the definition of
DELAY/FORCE from Scheme 48.  However, Phil's old code does leak in
Scheme 48 and doesn't leak with the proposed fix.  This is just a
note---I intend to check next week why this is so.

--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla