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.6 required=5.0 tests=AWL,HTML_00_10,HTML_MESSAGE, 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 64DDABC0C for ; Fri, 1 Dec 2006 01:38:15 +0100 (CET) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kB10cEDo011943 for ; Fri, 1 Dec 2006 01:38:15 +0100 Received: by nf-out-0910.google.com with SMTP id m19so3250027nfc for ; Thu, 30 Nov 2006 16:38:14 -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:references; b=Zsc6Mntl/MULFFM6j5WXSvtxbLF8bfmABHA1dD/WuQAG4zML+ZN/8WvCNcbadFV8Ez+sjSW7SS7WAe/p2UjppSyFq1wFyRCPxaYit/a/lgOsN3sxAqfuEf5Lxz03MFuUPdPiTA7VbOEpxVwnktZ1pTzCKPfF95pDokwZkdk+Jag= Received: by 10.82.107.15 with SMTP id f15mr945347buc.1164933494572; Thu, 30 Nov 2006 16:38:14 -0800 (PST) Received: by 10.82.176.16 with HTTP; Thu, 30 Nov 2006 16:38:14 -0800 (PST) Message-ID: Date: Fri, 1 Dec 2006 01:38:14 +0100 From: Tom To: "Neal Wang" Subject: Re: [Caml-list] Can GC be BLOCKed? Cc: "j h woodyatt" , "The Caml Trade" In-Reply-To: <1965df800611301607g330f5517saeba25d40c3321ca@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7168_16034979.1164933494516" References: <1965df800611291633q4f615df5qaa43dc967ba87d56@mail.gmail.com> <1FB91514-18D1-4502-AF67-C1003EB8636B@mac.com> <1965df800611301607g330f5517saeba25d40c3321ca@mail.gmail.com> X-j-chkmail-Score: MSGID : 456F7976.000 on discorde : j-chkmail score : X : 0/20 1 X-Miltered: at discorde with ID 456F7976.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; heap:01 heap:01 garbage:01 garbage:01 caml-list:01 functions:01 functions:01 data:02 data:02 allocated:03 allocated:03 allocate:06 allocate:06 function:08 function:08 X-Attachments: cset="UTF-8" cset="UTF-8" ------=_Part_7168_16034979.1164933494516 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hm... There is no way you could do that. If you do not know how much data your function would allocate, you cannot allocate it in advance. While your function is being executed, it might occur that the heap is full and that it needs to be garbage collected before your function could allocate further data. How do you think this would work if the GC would be disabled? By the way, it is possible to have C functions that are not interrupted by GC, but only when they allocate nothing - but whenever some new value is made, or something is allocated, there might be a need for GC. - Tom ------=_Part_7168_16034979.1164933494516 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hm... There is no way you could do that. If you do not know how much data your function would allocate, you cannot allocate it in advance. While your function is being executed, it might occur that the heap is full and that it needs to be garbage collected before your function could allocate further data. How do you think this would work if the GC would be disabled?

By the way, it is possible to have C functions that are not interrupted by GC, but only when they allocate nothing - but whenever some new value is made, or something is allocated, there might be a need for GC.

 - Tom
------=_Part_7168_16034979.1164933494516--