mixing Ocaml with another GC-ed language

From: STARYNKEVITCH Basile (Basile.Starynkevitch@cea.fr)
Date: Fri Feb 25 2000 - 14:37:31 MET

  • Next message: Juergen Pfitzenmaier: "cyclic dependencies"

    Hello All,

    In a few weeks I will perhaps code in Ocaml inside a static code
    analyzer tool written in C++ (don't ask me why.. it is a painful
    subject [see the thread "convincing management to code in Ocaml" on
    this same mailing list, that I started last year]).

    It is not really plain C++ because I did code a (precise, mostly
    copying, generational) garbage collector which is used in the
    project. So Ocaml code will be called from (and will probably upcall
    to) C++ code using my GC. So I do know my GC quite well (and studied
    Ocaml's GC a bit also). My GC also support finalized objects, which it
    does not move (so their address remain fixed).

    Does any people have concrete experience mixing Ocaml with another
    GC-ed language (e.g. Java or Common Lisp) inside the same program?

    I do have my precise ideas on the problem (essentially, avoid mixing
    pointers from both worlds, either by copying data or by using my
    finalized C++ GCed objects which are not moved by my GC). But I will
    be happy to hear from other people's experience. Any pitfalls to avoid
    are interesting to hear.

    The custom tag object (introduced in Ocaml3, see the Ocaml CVS
    webserver) might also be helpful.

    Regards

    N.B. Any opinions expressed here are only mine, and not of my organization.
    N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.

    ---------------------------------------------------------------------
    Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique
    DTA/LETI/DEIN/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX * France
    phone: 1,69.08.60.55; fax: 1.69.08.83.95 home: 1,46.65.45.53
    email: Basile point Starynkevitch at cea point fr



    This archive was generated by hypermail 2b29 : Fri Feb 25 2000 - 18:06:20 MET