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
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 (00:07)
From: Neal Wang <>
Subject: Re: [Caml-list] Can GC be BLOCKed?
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?

   Thanks again

On 11/29/06, James Woodyatt <> wrote:
> On Nov 29, 2006, at 4:33 PM, Neal Wang wrote:
> >
> > I have a function which cannot be interrupted by GC?  Is there a
> > way to BLOCK GC when the function is called.  Thanks
> We're getting some interesting spam on the OCaml list now.  Just
> after the message above appeared in my inbox, there came the
> following...
> On Nov 29, 2006, at 5:22 PM, Rosendo Larson wrote:
> >
> > The lot is cast into the heap, but the whole disposing there of is
> > of the Lord. There never was a great soul that did not have some
> > divine inspiration.
> At first, I thought this was intended to be a serious response to the
> question.
> I don't think you can stop collection from happening by explicitly
> blocking it in the GC, but if you know how much memory your function
> will allocate, you might be able to get a winning workaround by
> modifying the GC control parameters for space_overhead and
> major_head_increment.  Use the verbose flag to see if your function
> is triggering the collection phase.
> —
> j h woodyatt <>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports: