From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA15787; Thu, 9 Sep 2004 11:08:53 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA16301 for ; Thu, 9 Sep 2004 11:08:52 +0200 (MET DST) Received: from kraid.nerim.net (smtp-104-thursday.nerim.net [62.4.16.104]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i8998qtV032325 for ; Thu, 9 Sep 2004 11:08:52 +0200 Received: from localhost (karryall.dnsalias.org [62.4.18.180]) by kraid.nerim.net (Postfix) with ESMTP id 170DD417F9; Thu, 9 Sep 2004 11:08:51 +0200 (CEST) Date: Thu, 09 Sep 2004 11:08:50 +0200 (CEST) Message-Id: <20040909.110850.59463842.oandrieu@nerim.net> To: rich@annexia.org Cc: caml-list@inria.fr Subject: Re: [Caml-list] Gripes with array From: Olivier Andrieu In-Reply-To: <20040909082354.GA22512@annexia.org> References: <200409090310.29295.jon@jdh30.plus.com> <16704.901.571258.566181@gargle.gargle.HOWL> <20040909082354.GA22512@annexia.org> X-Mailer: Mew version 4.0.64 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 41401DA4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 andrieu:01 andrieu:01 2004:99 2004:99 filliatre:01 pointers:01 byterun:01 mlvalues:01 bigarrays:01 char:01 elt:01 arrays:01 bigarray:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Richard Jones [Thu, 9 Sep 2004]: > 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 use Bigarrays: open Bigarray type bigstring = (char, int8_unsigned_elt, c_layout) Array1.t all you need is to write some blitting functions for conversions to and from regular strings. > Does the tag field need to be so wide? What does the tag mean if it > has different values < No_scan_tag (251)? it's for variants (with or without arguments) -- Olivier ------------------- 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