Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] GC, Anonymous Functions, and C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] GC, Anonymous Functions, and C
On 17 déc. 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