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 (09:19)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Can GC be BLOCKed?
On Thu, Nov 30, 2006 at 04:07:51PM -0800, Neal Wang wrote:
> Thanks for your help.  But your solution only work for a function
> which allocates
>  memory of fixed size. Unfortunately, the atomic function, which
> cannot be interrupted by GC, read input data from external channels
> and the memory needed to store the input data is not determined ahead.
> The official interface of GC doesn't not provide a  way to stop GC. Is
> there a backdoor such that we can use to stop GC?

I can't see how this would work.  The minor heap is a fixed size (32K
or something) and when this is used up, you _have_ to do a minor

Can you tell us what the problem is that you're trying to solve?

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.


Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Internet Marketing and AdWords courses - http://merjis.com/courses - NEW!
Merjis blog - http://blog.merjis.com - NEW!