[gambit-list] Space leak or bad gc parameters?

Denis Fourt denis.prog at hotmail.com
Sun May 17 12:40:02 EDT 2015


Thanks for the explanation, using gsc leads effectively to a normal behaviour. 
Denis

> Subject: Re: [gambit-list] Space leak or bad gc parameters?
> From: feeley at iro.umontreal.ca
> Date: Sun, 17 May 2015 10:42:22 -0400
> CC: gambit-list at iro.umontreal.ca
> To: denis.prog at hotmail.com
> 
> 
> > On May 17, 2015, at 1:13 AM, Denis Fourt <denis.prog at hotmail.com> wrote:
> > 
> > I have just pasted it in gsi -:s so it should be ok, please have a look. I have also tried chibi and chicken and only scheme48 was able to achieve it with less than 60MB (although it was rather slow). Please tell me if you would like to see the more crude version with delay as a thunk.
> > 
> > Denis
> 
> If you compile the program it runs fine and with as little as 20MB heap.
> 
> The reason you are seeing a slowdown with the interpreter is that closures are not “safe for space” with the interpreter (but are “safe for space” with the compiler).  Safe for space means that a closure (in this case the one hidden in the implementation of “delay” in cons-stream) will only remember its free variables.  The interpreter keeps all “in scope” variables in the closure.  This is a deliberate decision because it gives a better debugging experience (you can inspect the free variables of a closure x with ,(v x) followed by ,e) allowing a better understanding of the evaluation context.
> 
> Marc
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://webmail.iro.umontreal.ca/pipermail/gambit-list/attachments/20150517/f884e4d3/attachment.html 


More information about the Gambit-list mailing list