[gambit-list] Problem with heap-size

Hans Petter Egesund petter.egesund at gmail.com
Thu Aug 14 09:11:44 EDT 2008


Hi, thanks for open-sourcing such a cool Scheme!

I am testing out how to make a large table, but have problems with  
heap-size:

(define t (make-table))

(define (doit x x-max)
    (if (<= x x-max)
       (begin
          (table-set! t (number->string x) x)
          (doit (+ x 1) x-max))))


(doit 1 1000000) works fine and is fast as well.
(doit 1 10000000) runs out of heap-space, which is probably not that  
strange.

I try to increase the heap, but still can't store any more records (I  
start gsi with parameter gsi -m:3000000 and/or gsi -h:3000000).

I have also compiled the program with gsc, and started the program  
with a larger heap, but the problem remains. If I try to allocate to  
much memory (like 5 GB on my 4 GB machine), the programs gives me an  
error msg, so it seems the heap is actually allocated?

Any clues?

Cheers,

Petter Egesund



More information about the Gambit-list mailing list