From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 3DBABBB81 for ; Sat, 18 Dec 2004 00:09:50 +0100 (CET) Received: from [IPv6:::1] (yquem.inria.fr [128.93.8.37]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBHN9mTq023830 for ; Sat, 18 Dec 2004 00:09:49 +0100 Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Damien Doligez Subject: Re: [Caml-list] GC, Anonymous Functions, and C Date: Sat, 18 Dec 2004 00:09:48 +0100 To: caml-list@yquem.inria.fr X-Mailer: Apple Mail (2.619) X-Miltered: at nez-perce with ID 41C3673C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 wrote:01 ocaml:01 ocaml:01 malloc:01 malloc:01 handler:01 stdlib:01 ...:98 doligez:01 doligez:01 functions:01 functions:01 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=none autolearn=disabled version=3.0.0 X-Spam-Level: On 17 d=E9c. 2004, at 22:55, Jonathan Roewen wrote: > 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. This is going to be extremely tricky, if it ever works, because OCaml code can allocate memory by calling malloc. And malloc is not reentrant, so calling it from a signal handler cannot be correct unless your main program never calls malloc, which rules out a large number of functions of the C stdlib. And you don't even know which ones exactly... -- Damien