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


Jim Blandy writes:
 > Hmm.  But the overall size of the process remains constant on Linux,
 > and grows without (apparent) bound on Solaris?

Linux does the simplest case
(do ((str (make-stream ...) (stream-cdr str)))
    ((stream-null? str)) ...)
in constant space. On Solaris it seems that the heap will grow
arbitrarily large before most of it eventually gets collected.

(stream-for-each (lambda (i) ...) (make-stream ...))
explodes on either architecture.

 > I remember Hans Boehm talking about all the tricks his GC does to
 > clear the stack whenever possible.

I found a pointer to that on this list. I tried to add a call to

static void scm_gc_clear_stack ()
{
  SCM dummy[2048];
  bzero (dummy, sizeof (SCM) * 2048);
}

at the start of each gc - more or less what Boehm does. It didn't
help...

 > Just for kicks, could you try putting a call to
 > SCM_FLUSH_REGISTER_WINDOWS at the top of the function SCM_CEVAL in
 > eval.c?

Sorry, it doesn't seem to help.

	Ole

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