English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-04-01 (00:23)
From: mulhern <mulhern@g...>
Subject: Re: Stack_overflow
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 = [("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.


On 3/31/06, mulhern <mulhern@gmail.com> 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