[gambit-list] problem with load.
Marc Feeley
feeley at iro.umontreal.ca
Wed Jun 20 09:44:14 EDT 2007
On 20-Jun-07, at 9:12 AM, |/|/ Bendick wrote:
> Speaking of heaps I can't get gambit to let me (make-vector 10000000)
> with any heap size...
>
> % unlimit
> % gsi -:h4000000
> Gambit Version 4.0 beta 22
>
>> (make-vector 10000000)
> *** ERROR IN ##make-vector -- Heap overflow
> 1>
>
> Any ideas?
In memory, objects are encoded as a sequence of machine words. The
first machine word is the header. It encodes some GC information and
the object's type (in the lower 8 bits of the word) and it uses the
remaining bits (24 on a 32 bit machine, or 56 on a 64 bit machine) to
encode the length of the object in bytes.
This means that on a 32 bit machine the largest vector is just shy of
2^24 bytes, or 2^22 words, i.e. roughly 4 million elements. On a 64
bit machine the virtual memory is the only limit.
Marc
More information about the Gambit-list
mailing list