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.0 required=5.0 tests=none 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 312BDBC0A for ; Wed, 4 Apr 2007 03:35:50 +0200 (CEST) Received: from ipmail02.adl2.internode.on.net (ipmail02.adl2.internode.on.net [203.16.214.141]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l341ZlEI011965 for ; Wed, 4 Apr 2007 03:35:49 +0200 X-IronPort-AV: E=Sophos;i="4.14,367,1170595800"; d="scan'208";a="105936841" Received: from ppp36-111.lns2.syd6.internode.on.net (HELO [192.168.1.201]) ([59.167.36.111]) by ipmail02.adl2.internode.on.net with ESMTP; 04 Apr 2007 11:05:43 +0930 Subject: Re: [Caml-list] Possible bug in DynArray module from ExtLib From: skaller To: ls-ocaml-developer-2006@m-e-leypold.de Cc: caml-list@inria.fr, Nicolas Cannasse In-Reply-To: References: <6120f6690703311115p78e1a981h1c8fe849c8d36742@mail.gmail.com> <87irchm9sf.fsf@mid.deneb.enyo.de> Content-Type: text/plain Date: Wed, 04 Apr 2007 11:35:40 +1000 Message-Id: <1175650540.24309.13.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 461300F3.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bug:01 0200,:01 ocaml's:01 compares:01 afaik:01 buffer:01 sourceforge:01 arbitrary:01 wrote:01 caml-list:01 argument:02 suggestion:03 module:03 library:03 library:03 On Wed, 2007-04-04 at 00:40 +0200, ls-ocaml-developer-2006@m-e-leypold.de wrote: > > 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. AFAIK DynArray has a resizer following my suggestion: you can supply an arbitrary resizer function on construction, presumably with a defaulted labelled argument (its the standard library Buffer that doesn't have one). I'm not sure, it's a while since I looked at ExtLib .. CC'd to Nicolas who owns the library. -- John Skaller Felix, successor to C++: http://felix.sf.net