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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id E1FA2BBBB for ; Sat, 1 Apr 2006 02:23:44 +0200 (CEST) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.198]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k310NhST018970 for ; Sat, 1 Apr 2006 02:23:44 +0200 Received: by xproxy.gmail.com with SMTP id i27so549761wxd for ; Fri, 31 Mar 2006 16:23:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dU+Y6Uyq1R5KTXY4DJ+WI2RX0xyEE4zkwDNV1/AsZFmdrqsgRcQz/mV/puHtYQ5JW7cH/Q5GmfBv5uvsTtCBv9dVrkIBNrlTl1EfYZX50uEki4BtEAWUNQyYXi4CV8BmjLwrU/jDgFYu8+TJO85hVH6lepRcjXrWFBjDy+w3glA= Received: by 10.70.54.12 with SMTP id c12mr59354wxa; Fri, 31 Mar 2006 16:23:43 -0800 (PST) Received: by 10.70.115.5 with HTTP; Fri, 31 Mar 2006 16:23:43 -0800 (PST) Message-ID: <54f15b6e0603311623y517b605elc52d6938edea3037@mail.gmail.com> Date: Fri, 31 Mar 2006 18:23:43 -0600 From: mulhern To: caml-list@yquem.inria.fr Subject: Re: Stack_overflow In-Reply-To: <54f15b6e0603311244u4677c290s481c4aaa859eae35@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <54f15b6e0603311244u4677c290s481c4aaa859eae35@mail.gmail.com> X-Miltered: at nez-perce with ID 442DC80F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; stack:01 mylist:01 ocamlc:01 stack:01 ocamlc:01 staged:01 compilation:01 wrote:01 exception:01 exception:01 compile:01 compile:01 compiles:01 portability:02 data:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Thanks to everybody who responded. To clarify things: I'm trying to _compile_ a list definition. So, my .ml file looks like this: --- let myList =3D [("first", ["some"; more]); ("second", ["more"; "still"])] --- except that there are 12,000 elements in the list instead of two as in the example. _ocamlc_ throws a Stack_overflow error while compiling this list. So, I want to know how to influence _ocamlc_ to be able to compile this or larger lists. The suggestion of chunkifying the list into smaller lists is a practical one; I may be forced to try it. ocamlc.opt compiles the list fine but that reduces portability. -mulhern On 3/31/06, mulhern wrote: > Hi! > > I'm trying to compile an automatically generated list definition with > approximately 12,000 elements. The list has type (record_type * > record_type list) list where record_type is a simple record with 4 > fields. > > I'm doing this because I'm trying to achieve a poor man's version of > staged compilation. > > Unfortunately, I get a Stack_overflow exception. If I roughly half the > number of elements in the list the Stack_overflow exception goes away. > > Does anybody have an suggestions for me to get around the stack > overflow problem? What if I want to make my data an order of magnitude > larger? > > Thanks! > > -mulhern >