From: Martin Jambon <martin1977@laposte.net>
To: Denis Bueno <dbueno@gmail.com>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamlc Stack_overflow
Date: Tue, 8 Aug 2006 21:19:38 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0608082110280.2677@droopy> (raw)
In-Reply-To: <6dbd4d000608081900m267ea9d2mc0043962cd35d6f@mail.gmail.com>
On Tue, 8 Aug 2006, Denis Bueno wrote:
> [I tried sending this a few days ago with a rather large attachment.
> Since it hasn't been approved since then, I'm sending it again, sans
> attachment.]
>
> All--
>
> The source file available on my website [2] gives the following output
> (when uncompressed, of course):
>
> ,----
> | $ ocamlc -g -c spit_etest.ml
> | Fatal error: exception Stack_overflow
> `----
>
> I really have no idea where to start, whether it's my fault or
> ocamlc's. I have included some relevant system information [1].
>
> Could someone point my in the right direction?
You are using a huge list, and it is likely that the compiler uses some
functions which will use stack space proportionally to the size of your list.
You can use one of the following options:
- use ocamlc.opt instead of ocamlc
- increase the maximum size of the stack:
env OCAMLRUNPARAM=l=10M ocamlc -c spit_etest.ml
- store your data externally
Note that your program itself might have the same problem at runtime if
you use non-tail-call optimized functions like List.map (see
documentation for module List).
Martin
--
Martin Jambon, PhD
http://martin.jambon.free.fr
next prev parent reply other threads:[~2006-08-09 4:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 1:03 Denis Bueno
2006-08-09 2:00 ` Denis Bueno
2006-08-09 2:54 ` [Caml-list] " Jon Harrop
2006-08-09 4:19 ` Martin Jambon [this message]
2006-08-09 13:41 ` Denis Bueno
-- strict thread matches above, loose matches on Subject: below --
2003-11-24 17:21 [Caml-list] Ocamlc stack overflow Alex Baretta
2003-11-24 17:47 ` Richard Jones
2003-11-25 13:19 ` Alex Baretta
2003-11-25 14:06 ` Richard Jones
2003-11-25 17:50 ` Xavier Leroy
2003-11-24 18:22 ` Damien Doligez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0608082110280.2677@droopy \
--to=martin1977@laposte.net \
--cc=caml-list@inria.fr \
--cc=dbueno@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox