[plt-scheme] Adjustable arrays for specified type

From: Noel Welsh (noelwelsh at gmail.com)
Date: Sat Feb 13 05:14:34 EST 2010

(greatest-fixnum) is a lot of elements -- storing that many ints in
the most compact representation possible will take about 1/4 of
addressable memory (1GB on a 32-bit machine). If you *really* want to
maintain vectors that large you'll need to write your own
implementation either using the compact vectors in SRFI-4 or using
something backed by disk. For less demanding applications the evector
implementation should be fine.

HTH,
N.

On Fri, Feb 12, 2010 at 10:53 PM, Slobodan Blazeski
<slobodan.blazeski at gmail.com> wrote:
> Thank you for your prompt replies. Since these arrays could grow huge in
> length and will hold just unsigned integers I could use some advice
> regarding the storage strategy.
> Is it possible to specify them to hold just fixnums? Trying
> (define foo (make-evector (greatest-fixnum)))
> . . make-vector: out of memory making vector of length 1073741823
> I have a limit of 2048MB on my plt scheme
>
> Slobodan
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>


Posted on the users mailing list.