This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: conservative scanning and infinite streams



> 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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]