Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Neal Wang <neal.wang@g...>
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
Neal

On 11/29/06, James Woodyatt <jhwoodyatt@mac.com> 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 <jhw@conjury.org>
> http://jhw.vox.com/
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>