Browse thread
[Caml-list] Problem with GC and custom blocks
-
Falk Hueffner
-
Damien Doligez
- Falk Hueffner
-
Damien Doligez
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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! -- Falk ------------------- 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