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
Marshalling question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-10-08 (13:48)
From: Mathias Kende <mathias.kende@e...>
Subject: Re: [Caml-list] Marshalling question
Le vendredi 08 octobre 2010 à 15:37 +0200, Jean Krivine a écrit :
> Dear ocaml users,
> A simple question: is it safe to marshalize a data structure that
> contains imperative elements (like arrays or hashtbl) ?

It's relatively safe to do so. The only thing is that if it is
unmarshalled in the process where it was marshalled you will still and
up with a new array or hashtbl.

Exception are some complex datastructure which may require additional
care when marshalled. An example of which are the graphs of the
ocamlgraph library (even the functional one), but there is none in the
standard library.

> I found the documentation of the Marshal module rather obscure to me.
> In particular it is not clear whether I should use the No_sharing
> flag.

This flag is never needed but there is cases where it is mandatory *not*
to use it (with cyclic data).


> Thank you!
> J
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports: