From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id E9AB8BB84 for ; Mon, 15 May 2006 23:27:11 +0200 (CEST) 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 k4FLRBpM022012 for ; Mon, 15 May 2006 23:27:11 +0200 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 XAA15439 for ; Mon, 15 May 2006 23:27:11 +0200 (MET DST) From: akalin@akalin.cx Received: from eigen.apisnetworks.com (eigen.apisnetworks.com [67.15.52.22]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k4FLR8UH007937 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 May 2006 23:27:10 +0200 Received: from eigen.apisnetworks.com (localhost.localdomain [127.0.0.1]) by eigen.apisnetworks.com (8.12.11.20060308/8.12.10) with ESMTP id k4FLR8X0007732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 May 2006 17:27:08 -0400 Received: (from apache@localhost) by eigen.apisnetworks.com (8.12.11.20060308/8.12.10/Submit) id k4FLR85S007729; Mon, 15 May 2006 17:27:08 -0400 Received: from 207-171-180-101.amazon.com (207-171-180-101.amazon.com [207.171.180.101]) by horde.akalin.cx (Horde MIME library) with HTTP; Mon, 15 May 2006 17:27:07 -0400 Message-ID: <20060515172707.akpiue238co84408@horde.akalin.cx> Date: Mon, 15 May 2006 17:27:07 -0400 To: Damien Doligez Cc: caml users Subject: Re: [Caml-list] Array 4 MB size limit References: <20060515141230.ajyupn2z28k0484s@horde.akalin.cx> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.4-RC2) X-Miltered: at concorde with ID 4468F22F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4468F22C.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; damien:01 damien:01 arrays:01 arrays:01 surprising:01 bug:01 stack:01 parser:01 recursive:01 stack:01 ocamlyacc:01 lalr:01 2006:98 15,:98 wrote:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=NO_REAL_NAME autolearn=disabled version=3.0.3 Quoting Damien Doligez : > On 2006-05-15, at 20:12, akalin@akalin.cx wrote: > >> 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 ;-) Of course it will. :) But what I meant was that the limit is nowhere near 32 bits (4 MB is only 22 bits), which leads me to believe that the limit is due to the implementation of arrays. I was asking if there would be an improved implemetation of arrays which would increase this limit (up to 32 bits). >> 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. I was thinking otherwise, as it seemed to be crashing only when building the list. The list is built by a parser rule which is reading from a line of floats. The rule itself is recursive, which does imply a stack overflow, (or does it? ocamlyacc generates a LALR or some variant, right?) but changing that rule to use a Queue worked fine. (Until I tried to convert it into an array, which led me to discover the 4 MB limit) Incidentally, what data structure does the Queue use internally? I didn't run into any of the problems I did with lists or arrays. Frederick Akalin