From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA08909; Mon, 2 Aug 2004 17:50:00 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA08410 for ; Mon, 2 Aug 2004 17:49:58 +0200 (MET DST) Received: from mx5.informatik.uni-tuebingen.de (mx5.Informatik.Uni-Tuebingen.De [134.2.12.32]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i72FnuSH012710 for ; Mon, 2 Aug 2004 17:49:57 +0200 Received: from localhost (loopback [127.0.0.1]) by mx5.informatik.uni-tuebingen.de (Postfix) with ESMTP id A40F1120; Mon, 2 Aug 2004 17:49:56 +0200 (MST) Received: from mx5.informatik.uni-tuebingen.de ([127.0.0.1]) by localhost (mx5 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30458-05; Mon, 2 Aug 2004 17:49:54 +0200 (DFT) Received: from juist (semeai.Informatik.Uni-Tuebingen.De [134.2.15.66]) by mx5.informatik.uni-tuebingen.de (Postfix) with ESMTP id AF9B0115; Mon, 2 Aug 2004 17:49:54 +0200 (MST) Received: from falk by juist with local (Exim 4.34) id 1Brf4T-0005x1-EO; Mon, 02 Aug 2004 17:49:53 +0200 To: xm@xmunkki.org Cc: OCaml Subject: Re: [Caml-list] "noalloc" + enter/leave blocking section - safe? References: <20040802104349.GA6997@fichte.ai.univie.ac.at> <20040802151502.GA10950@fichte.ai.univie.ac.at> <20040802183445.A25192@xmunkki.org> From: Falk Hueffner X-Face: "iUeUu$b*W_"w?tV83Y3*r:`rh&dRv}$YnZ3,LVeCZSYVuf[Gpo*5%_=/\_!gc_,SS}[~xZ wY77I-M)xHIx:2f56g%/`SOw"Dx%4Xq0&f\Tj~>|QR|vGlU}TBYhiG(K:2 (Jere Sanisalo's message of "Mon, 2 Aug 2004 18:34:45 +0300") Message-ID: <87wu0hmtem.fsf@informatik.uni-tuebingen.de> User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (cabbage, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (McAfee AntiVirus) at informatik.uni-tuebingen.de X-Miltered: at concorde with ID 410E62A4.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 noalloc:01 falk:01 hueffner:01 hueffner:01 2004:99 foo:01 foo:01 stub:01 noalloc:01 restores:01 unboxed:01 floats:01 falk:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Jere Sanisalo writes: > On Mon, Aug 02, 2004 at 05:15:02PM +0200, Markus Mottl wrote: >>--------------------------------------------------------------------------- >>external foo : 'a -> unit = "foo_stub" "noalloc" > > Hmm, I wasn't aware that there was a "noalloc" directive. What does > it specifically declare? Does it make ocaml call the natives in a > more efficient manner (and of course the function must not allocate > anything)? It calls the C function directly, with zero overhead. Otherwise, the call goes through "caml_c_call", which puts the GC state into global variables for C to pick up, and restores it later from there. > Are there any other directives I should be aware of? There's "float", which means the function works on unboxed floats. -- Falk ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners