From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id B6CB3BC88 for ; Fri, 4 Feb 2005 10:37:06 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j149b6sW000366 for ; Fri, 4 Feb 2005 10:37:06 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA14015 for ; Fri, 4 Feb 2005 10:37:05 +0100 (MET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j149b5Wu000363 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 4 Feb 2005 10:37:05 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1Cwztg-0003xE-00 for ; Fri, 04 Feb 2005 09:37:04 +0000 Date: Fri, 4 Feb 2005 09:37:04 +0000 Cc: caml-list@inria.fr Subject: Re: [Caml-list] Estimating the size of the ocaml community Message-ID: <20050204093704.GA15155@furbychan.cocan.org> References: <000f01c50971$baad4840$0100a8c0@mshome.net> <1107403128.32586.223.camel@pelican.wigram> <20050203173556.4acec1c5.ocaml-erikd@mega-nerd.com> <009a01c50a1e$f6c92080$0100a8c0@mshome.net> <4202A6AA.3030807@trdlnk.com> <20050203233950.GB7121@furbychan.cocan.org> <002c01c50a98$84337a00$0100a8c0@mshome.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002c01c50a98$84337a00$0100a8c0@mshome.net> User-Agent: Mutt/1.3.28i From: Richard Jones X-Miltered: at concorde with ID 42034242.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42034241.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 gava:01 wrote:01 arises:01 ocaml:01 byte:01 byte:01 pointer:01 indirection:01 notepad:01 ric:98 short:01 strings:01 strings:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Fri, Feb 04, 2005 at 10:04:20AM +0100, Fr?d?ric Gava wrote: > But this problem is a problem of the implementation and not a > problem of language design. Maybe in the futur, this limitation > would be deleted. It's a problem of the implementation, but one which looks hard to change. The reason it arises is because each OCaml value has a 4 byte[*] header, divided into a 1 byte tag, 2 bits for the GC, and the remaining 22 bits to store the size of the value in words. Since strings are stored directly in the value (which is very efficient), they are limited to 4 * (2^22 - 1) bytes ~ 16 MB in size. Any other representation would penalise the common case (short strings) - for example, having strings represented as a (length, pointer) tuple would cause an extra indirection; and having long strings represented with a special "all 1s" length would penalise the code all over the place. So not easy to fix. Rich. [*] On 32-bit platforms. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com