This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: conservative scanning and infinite streams
- To: Ole Myren Rohne <ole dot rohne at cern dot ch>
- Subject: Re: conservative scanning and infinite streams
- From: Jim Blandy <jimb at red-bean dot com>
- Date: 24 Mar 2000 12:34:27 -0500
- Cc: guile at sourceware dot cygnus dot com
- References: <14555.39096.640307.723245@pcedu1.cern.ch>
> I'd like to use very long streams, but it a steady growing heap makes
> this impractical.
>
> Instrumenting gc.c, I have convinced myself that the c stack is
> holding on to the garbage. As my knowledge of gc is very shallow, I
> have no idea why this happens. Naively, it should be possible to
> ensure constant heap as well as constant stack?
>
> Do I have any option but rewriting my streams in loop style?
Are you *sure* the "garbage" is really garbage? It looks to me like
stream-fold, used by stream-for-each, is written (probably
accidentally) so that it holds onto the initial stream until it returns.
Have you tried rewriting your code without using stream-for-each?