Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Array 4 MB size limit
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] Array 4 MB size limit
On 2006-05-15, at 20:12, wrote:

> I'm running into cases where the 4 MB limit on arrays is starting  
> to become a problem.  Lists are much slower and cause seg faults  
> for me on the same data set, and Bigarrays are a partial solution  
> because I'd like to be able to store arbitrary types in arrays (not  
> just numbers).

You could move to a two-level solution (an array of arrays).  The  
code is not
hard to write, but it does entail a performance hit, which may or may  
not matter
for your application.

> I was greatly surprised when I found out there was such a low limit  
> on arrays.  Is there a reason for this?  Will this limit ever be  
> increased?

It will be increased when you get a 64-bit machine ;-)

> Also, the fact that using lists crashes for the same data set is  
> surprising.  Is there a similar hard limit for lists, or would this  
> be a bug?  Should I post a test case?

I bet my mustache these crashes are stack overflows.

-- Damien