From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 93B33BC0A for ; Fri, 1 Dec 2006 01:07:52 +0100 (CET) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kB107qlK004920 for ; Fri, 1 Dec 2006 01:07:52 +0100 Received: by ug-out-1314.google.com with SMTP id k3so2001691ugf for ; Thu, 30 Nov 2006 16:07:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LF+CgLwSLe0YBdqy2IaXIZVwZFvVermqS3gFa2/MzG9w8gp7sAEKvSxfhXngxYudZxjQTayRvokLwTFS7Y1N/JElWjqETA6V2yD9r38+vXuZvILtCaWAOJaf2qosa4zFE3uE4RZIHTTmeUYP6uslfSILTq64UolSRAii2vh/c6c= Received: by 10.78.149.13 with SMTP id w13mr4212725hud.1164931671621; Thu, 30 Nov 2006 16:07:51 -0800 (PST) Received: by 10.78.14.7 with HTTP; Thu, 30 Nov 2006 16:07:51 -0800 (PST) Message-ID: <1965df800611301607g330f5517saeba25d40c3321ca@mail.gmail.com> Date: Thu, 30 Nov 2006 16:07:51 -0800 From: "Neal Wang" To: "j h woodyatt" Subject: Re: [Caml-list] Can GC be BLOCKed? Cc: "The Caml Trade" In-Reply-To: <1FB91514-18D1-4502-AF67-C1003EB8636B@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1965df800611291633q4f615df5qaa43dc967ba87d56@mail.gmail.com> <1FB91514-18D1-4502-AF67-C1003EB8636B@mac.com> X-j-chkmail-Score: MSGID : 456F7258.000 on discorde : j-chkmail score : X : 0/20 1 X-Miltered: at discorde with ID 456F7258.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; allocates:01 woodyatt:01 ocaml:01 verbose:01 woodyatt:01 jhw:01 jhw:01 beginner's:01 ocaml:01 bug:01 larson:98 winning:98 heap:01 beginners:01 wrote:01 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 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. > > > =97 > j h woodyatt > 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 >