From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 3DA1DBB81 for ; Fri, 17 Dec 2004 22:55:25 +0100 (CET) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBHLtOx4016936 for ; Fri, 17 Dec 2004 22:55:24 +0100 Received: by rproxy.gmail.com with SMTP id j1so1426510rnf for ; Fri, 17 Dec 2004 13:55:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=ZOI5tpdRQl5Z7lgV11eAGYtGc3mJI6GPbhfkLqdKiEaYQ8YrRwxFqh0b68A4lh4O71GhPjKo9RHp8nOrRhq9+t5flMCmGmJ3m8cjOPOttMX+9cRLG9Ltq9xhoBGiVoyU3Fjy8rEJ/lQl69tlNsH5qJODPyuZyzOeAY29SiSuh7U= Received: by 10.38.65.19 with SMTP id n19mr52388rna; Fri, 17 Dec 2004 13:55:23 -0800 (PST) Received: by 10.38.209.61 with HTTP; Fri, 17 Dec 2004 13:55:23 -0800 (PST) Message-ID: Date: Sat, 18 Dec 2004 10:55:23 +1300 From: Jonathan Roewen Reply-To: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: [Caml-list] GC, Anonymous Functions, and C Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 41C355CC.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ocaml:01 functions:01 functions:01 passing:01 somewhere:02 context:04 problem:05 basically:07 jump:08 function:08 should:13 done:14 interrupt:16 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: Hi, When passing an anonymous ocaml function to a C function, is it safe to store that value in an array, and then call it later at an abitrary time, or will the GC reclaim it? And if so, what should be done to stop the GC from doing so? Basically, we're trying to do interrupt handling from OCaml, and need to store the anonymous functions somewhere for the IDT to jump into, to provide a little context for the problem. Regards, Jonathan Roewen