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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-14 (10:01)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] marshalling objects
From: sejourne_kevin <>
> Jacques Garrigue a écrit :
> > Note that this means that the method table is really sent, as an array
> > of closures, which is possibly very innefficient, and also means that
> > the program on the other side must be the same one.
> Exactly the same one or just all classes ?
> I think this could be in the manual of module Marshal.

Actually it's just a consequence of the internal representation of
classes, which is described in the C interface section.
That is, each object contains an array with all its methods, which are
function closures.
This is the reason you need the flag for closures.
And the condition with closures is quite explicit: this must be
exactly the same program. I also expect that, for native code, it must
be the same architecture.

Jacques Garrigue