Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
ocaml+twt v0.90
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-01-17 (16:32)
From: Olivier Andrieu <oandrieu@n...>
Subject: Re: [Caml-list] marshaling limits
On 1/17/07, Daniel Bünzli <> wrote:
> Le 17 janv. 07 ŕ 16:41, Sebastien Ferre a écrit :
> > pourtant, je passe bien par un appel a output_value
> > dans un fichier, sans passer par une chaine intermediaire.
> Maybe output_value uses a string internally. Try with a bytecode
> version of your executable, an exception should be raised (or have a
> look at the implementaiton of output_value).

output_value doesn't use a string internally, it uses malloc. Anyway,
if the marshalling function runs out of memory (wether because malloc
returns NULL or because the caml string is too large), an
Out_of_memory exception is raised.

If it segfaults, that's most probably because the marshalling runs out
of executable stack (because of too much recursion). I've seen it do
this before. The "fix" is to increase the maximum size of the
executable stack.

The behavior is the same with bytecode or native code since it's not
the interpreter's stack that overflows, it's the C one.