Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Gripes with array
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <info@g...>
Subject: Re: [Caml-list] Gripes with array
Am Don, 2004-09-09 um 10.23 schrieb Richard Jones:
> On Thu, Sep 09, 2004 at 09:17:25AM +0200, Jean-Christophe Filliatre wrote:
> > 
> > Jon Harrop writes:
> >  > 
> >  > Does anyone have any pointers to information about the origin of the size 
> >  > limit for arrays? I assume it is something to do with the garbage collector 
> >  > using a fixed-size tag instead of a variable-size one but I'd be interested 
> >  > in the details.
> > 
> > In ocaml sources, the  file byterun/mlvalues.h gives all details about
> > the  block  header structure.  There  you can  see  that,  on 32  bits
> > architecture,  the block size  (in words)  is stored  on 22  bits. And
> > indeed Sys.max_array_length is equal to 2^22-1.
> > 
> > But I must  agree with you: this is definitely too  small and we could
> > imagine  that, when the  tag says  a block  is an  array, the  size is
> > stored within the first (or the last) field instead.
> 
> I have a similar problem with the maximum size of strings.  In
> practical terms, it limits the size of file uploads to COCANWIKI to
> around 6 MB (ie., not very much) [not the full 16 MB because of
> character escaping, but even 16 MB would be far too small].

You can switch to OCamlnet as base library which does not have this
limitation. One can directly write the uploaded data to disk.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
------------------------------------------------------------

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners