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
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.