English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2004-09-09 (07:17)
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] Gripes with array

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.

Jean-Christophe Filliâtre

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