Browse thread
Disabling the OCaml garbage collector
[
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: | Raj <rajb@r...> |
| Subject: | Re: [Caml-list] Disabling the OCaml garbage collector |
Thank you for the advice, Xavier. I would highly appreciate any pointers to existing code that does the 'register_global_roots()' thing. Examples would definitely help me code it correctly. Regards Raj Xavier Leroy wrote: > > > The solution to your problem is to play nice with the Caml GC: on the > C/Python side, handle Caml "values" through an indirection via a > malloc-ed block, and register the Caml value contained within this > block with the Caml GC using register_global_roots(), as Thomas > Fischbacher outlined. Members of this list can probably point you to > some existing C/Caml bindings that does just this and that you could > use as inspiration. > > Hope this helps, > > - Xavier Leroy >