[gambit-list] problem with load.

Marc Feeley feeley at iro.umontreal.ca
Tue Jun 19 12:55:42 EDT 2007

On 19-Jun-07, at 9:59 AM, naruto canada wrote:

> gambit-c seems to have problem with "load".
> I was able to load a test file 26meg with petite and mzscheme, but
> crashes gambit-c. (gsi)

By "crash" do you mean a segment violation or a "heap overflow" message?

By my calculations it will require roughly 500 MB of RAM to load a 26  
meg source code file using "load".  The whole program must be read as  
a single "begin" expression, and then that expression is passed to  
the evaluator.

> the file has no code really, just repeatedly set! and call a  
> function like:
> the file has all the integer sequence from :
> http://www.research.att.com/~njas/sequences/index.html
> the way petite and mzscheme did it was like treating the file as input
> from console
> (I guess), while gambit-c maybe trying to load it into memory?

You can get the same thing with Gambit using the -:d- option, i.e.:

   % gsi -:d- < big-file.scm

It will be like typing each expression in the file at the REPL (which  
is semantically slightly different in the handling of macros, which  
are "local" to a file in Gambit when the file is "loaded").


More information about the Gambit-list mailing list