From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA28450 for caml-redistribution@pauillac.inria.fr; Fri, 25 Feb 2000 18:02:57 +0100 (MET) Resent-Message-Id: <200002251702.SAA28450@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA05970 for ; Fri, 25 Feb 2000 14:37:33 +0100 (MET) Received: from muguet.saclay.cea.fr (muguet.saclay.cea.fr [132.166.192.6]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id OAA00600 for ; Fri, 25 Feb 2000 14:37:33 +0100 (MET) Received: from harpie.saclay.cea.fr (harpie.saclay.cea.fr [132.166.133.152]) by muguet.saclay.cea.fr (8.9.1a/8.9.1/CEAnet-relay-5.1.D20+Y2K) with ESMTP id OAA25663; Fri, 25 Feb 2000 14:36:28 +0100 (MET) Received: by harpie.saclay.cea.fr (8.8.8+Sun/CEANET.2.0.1) id OAA04085; Fri, 25 Feb 2000 14:37:31 +0100 (MET) From: STARYNKEVITCH Basile MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-ID: <14518.34203.741447.637489@gargle.gargle.HOWL> Date: Fri, 25 Feb 2000 14:37:31 +0100 (MET) To: Subject: mixing Ocaml with another GC-ed language X-Mailer: VM 6.75 under Emacs 20.5.1 Content-Transfer-Encoding: 8bit Resent-From: weis@pauillac.inria.fr Resent-Date: Fri, 25 Feb 2000 18:02:57 +0100 Resent-To: caml-redistribution@pauillac.inria.fr 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