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 SAA10113; Mon, 2 Aug 2004 18:02:34 +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 SAA10254 for ; Mon, 2 Aug 2004 18:02:33 +0200 (MET DST) Received: from annexia.force9.co.uk (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i72G2WSH014267 for ; Mon, 2 Aug 2004 18:02:32 +0200 Received: from rich by annexia.force9.co.uk with local (Exim 3.36 #1 (Debian)) id 1BrfGi-0001KA-00 for ; Mon, 02 Aug 2004 17:02:32 +0100 Date: Mon, 2 Aug 2004 17:02:32 +0100 Cc: OCaml Subject: Re: [Caml-list] "noalloc" + enter/leave blocking section - safe? Message-ID: <20040802160231.GA5067@annexia.org> References: <20040802104349.GA6997@fichte.ai.univie.ac.at> <20040802151502.GA10950@fichte.ai.univie.ac.at> <20040802183445.A25192@xmunkki.org> <87wu0hmtem.fsf@informatik.uni-tuebingen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wu0hmtem.fsf@informatik.uni-tuebingen.de> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at concorde with ID 410E6598.000 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 2004:99 falk:01 hueffner:01 2004:99 foo:01 foo:01 stub:01 noalloc:01 restores:01 unboxed:01 floats:01 dbi:99 threads:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Aug 02, 2004 at 05:49:53PM +0200, Falk Hueffner wrote: > 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. Cool features! Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment PTHRLIB is a library for writing small, efficient and fast servers in C. HTTP, CGI, DBI, lightweight threads: http://www.annexia.org/freeware/pthrlib/ ------------------- 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