English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
OCaml and Boehm
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-04-12 (12:09)
From: Lukasz Stafiniak <lukstafi@g...>
Subject: Re: [Caml-list] OCaml and Boehm
On Sun, Apr 12, 2009 at 5:34 AM, Goswin von Brederlow <goswin-v-b@web.de> wrote:
> Correct me if I'm wrong but aren't pointers in ocaml always pointing
> inside allocated memory instead of its begining? Each block has a
> header and the ocaml value points to after the header. So every ocaml
> value would be 4/8 bytes offset to the real address of a block.
> Can Boehm cope with that at all?

Boehm is only supposed to collect the C(++)land values. One can
register the OCaml-boxed pointers that refer to these values as
Boehm-GC roots, and deregister them (?) in the OCaml-finalizers for
the pointers. I don't see anything scary with this approach, provided
(?) is possible. Is the performance penalty as big as with smart