From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=AWL,NO_REAL_NAME autolearn=disabled version=3.1.3 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 6944BBC0A for ; Wed, 4 Apr 2007 00:33:43 +0200 (CEST) Received: from server2.thinkcrime.de (server2.thinkcrime.de [213.133.110.149]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l33MXgYc009885 for ; Wed, 4 Apr 2007 00:33:43 +0200 Received: from hod-sarge-2005-10.lan.m-e-leypold.de (dslb-088-074-034-145.pools.arcor-ip.net [88.74.34.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server2.thinkcrime.de (Postfix) with ESMTP id C5911488176 for ; Wed, 4 Apr 2007 00:33:45 +0200 (CEST) Received: by hod-sarge-2005-10.lan.m-e-leypold.de (Postfix, from userid 1003) id D4793376C9; Wed, 4 Apr 2007 00:40:47 +0200 (CEST) To: caml-list@inria.fr Subject: Re: [Caml-list] Possible bug in DynArray module from ExtLib References: <6120f6690703311115p78e1a981h1c8fe849c8d36742@mail.gmail.com> <87irchm9sf.fsf@mid.deneb.enyo.de> Organization: Leypold, Software-Dienstleistungen und -Beratung From: ls-ocaml-developer-2006@m-e-leypold.de Date: Wed, 04 Apr 2007 00:40:47 +0200 In-Reply-To: <87irchm9sf.fsf@mid.deneb.enyo.de> (Florian Weimer's message of "Sat, 31 Mar 2007 22:34:56 +0200") Message-ID: User-Agent: Some cool user agent (SCUG) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Miltered: at concorde with ID 4612D647.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bug:01 arrays:01 ocaml's:01 compares:01 markus:01 rio:98 exception:01 caml-list:01 writes:01 functions:01 florian:03 seems:03 module:03 entries:05 exponential:06 Florian Weimer writes: > * D=E1rio Abdulrehman: > >> The first of the following functions causes a "Fatal error: exception >> Out_of_memory", while the second works fine. >> This error seems to occur when creating large arrays with more than 2 >> million and something entries. > > The exponential resizer probably exceeds Ocaml's array length limit, > while direct creation does not. So a smarter resizer would be required: One which compares with the array length limit and satisfies the request with that if necessary and possible. Regards -- Markus