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
Can GC be BLOCKed?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-12-01 (13:46)
From: Dmitry Bely <dmitry.bely@g...>
Subject: Re: [Caml-list] Can GC be BLOCKed?
On 12/1/06, Richard Jones <rich@annexia.org> wrote:

> I've only seen two cases where I'd want to stop the GC from running:
> (1) During quasi real-time operations (eg. a single frame in a game) --
> this can be solved by making the heap large enough and running the GC
> at scheduled points.  (2) When the heap is larger than physical RAM --
> this is solved using our 'Ancient' module.

I have a main program in C that periodically calls an OCaml function
and expects the (near) real time response. So I'd like to avoid gc
inside that function. My current plan is to have another OCaml thread
that is unfrozen just before returning results to C and does the minor
(or major - how to decide which one?) garbage collection. Will it

- Dmitry Bely