Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Disabling the OCaml garbage collector
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-11-28 (19:29)
From: Raj <rajb@r...>
Subject: Re: [Caml-list] Disabling the OCaml garbage collector
You are absolutely right, Thomas. Internally, my program goes back and 
forth between Python and OCaml via C, and there can be chains of calls 
e.g. OCaml -> Python -> OCaml ->... and so on. If I'm passing a 
reference to a mutable object (e.g. an Array) around these call-chains, 
I need to make sure the GC doesn't move it around unexpectedly.

Thank you for the suggestions, folks. I'll follow them up and see how 
they work.


Thomas Fischbacher wrote:
> Most likely, he calls back into another OCaml function from Python which
> does some memory allocation... In real applications, this situation is
> practically impossible to avoid.