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
[Caml-list] Problem with GC and custom blocks
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-25 (18:51)
From: Falk Hueffner <falk.hueffner@s...>
Subject: Re: [Caml-list] Problem with GC and custom blocks
Damien Doligez <Damien.Doligez@inria.fr> writes:

> What you should do is:
> 1. modify clone_graph to take a parameter of type "value"
> 2. protect this parameter with CAMLparam1
> Even if another copy of the same address is protected in
> "set_connected_c" under the name of "gv", you still need to protect
> it under its new name in clone_graph, so the GC will be able to
> update both copies when it moves the data.
> Please let me know if this helps.

It helps. It's actually pretty obvious now that I know it, I was just
somehow fixed to the idea that the GC considered the object dead
erraneously, and did not consider moving... Thanks!


To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners