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 11 Mar 2003 14:58 UTC

>>>>> "Matze" == Matthias Neubauer <xxxxxx@informatik.uni-freiburg.de> writes:

Matze> The real problem is see is the following: as soon as I apply some kind
Matze> of abstraction over STREAM-FILTER---which is something every Schemer
Matze> wants to do of course---, hell breaks loose again. E.g., if I type

Matze>    (define (filter-zero stream)
Matze>      (stream-filter (lambda (x) (zero? x))
Matze>                     stream))

Matze>    (stream-car (filter-zero (stream-from 1)))

Matze> in scsh, I will again see a space leak.

Matze> Considering all the major Scheme implementations, how common is it to
Matze> use a flat closure representation for procedures?

This won't be solved by flat closures---the call to FILTER-ZERO is a
non-tail call, and it'd be necessary to mark dead variables in
continuation frames to make this not leak.  There's provision for
doing that in Scheme 48, but a compiler which exploits it is still in
the works.  (That specific part is functional, though.)

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