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 EAA21094; Fri, 2 Aug 2002 04:56:26 +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 EAA21066 for ; Fri, 2 Aug 2002 04:56:26 +0200 (MET DST) Received: from ext-nj2gw-2.online-age.net (ext-nj2gw-2.online-age.net [216.35.73.164]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g722uOL17677 for ; Fri, 2 Aug 2002 04:56:25 +0200 (MET DST) Received: from int-nj2gw-4.online-age.net (int-nj2gw-4 [3.159.236.68]) by ext-nj2gw-2.online-age.net (8.12.3/8.9.1/990426-RLH) with ESMTP id g722uMGd007269; Thu, 1 Aug 2002 22:56:22 -0400 (EDT) Received: from uswaumsxbhmedge.med.ge.com (localhost [127.0.0.1]) by int-nj2gw-4.online-age.net (8.12.3/8.12.3/990426-RLH) with ESMTP id g722uGh2019327; Thu, 1 Aug 2002 22:56:17 -0400 (EDT) Received: by amermsx.med.ge.com with Internet Mail Service (5.5.2656.59) id ; Thu, 1 Aug 2002 21:56:10 -0500 Message-ID: From: "Gurr, David (MED, self)" To: Travis Bemann Cc: caml-list@inria.fr Subject: [Caml-list] real-time ocaml RE: ocaml, simd, & fftwgel Date: Thu, 1 Aug 2002 21:56:09 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Travis Bemann: > Note that there is no such thing as a C allocator in OCaml, even > though you can have "custom blocks" that have custom C finalization > code (and which are also not looked inside by OCaml itself). ... I chop my code into real and non-real time parts. The real time part does no allocation. At initialization time I call a C function that mallocs all the memory the real time portion will use and returns a slew of pointers. The pointers will not be followed by GC since they are outside the heap. That is good since the stuff they point to will never contain pointers to memory allocated at run time and thus no pointers to OCaml allocated memory. This is what I would do in any language. If you use Camoflage, you can even use OCaml type defs to do the memory layout. By doing this, I dont care about the GC or compaction or finialization or ... . The only time there is a problem is if ocamlopt heap allocs a float and the work arounds for that are no worse than writing a small chunk of code in C. It is less painful than handwritten C. -D ------------------- 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