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 DAA02444; Fri, 4 Oct 2002 03:39:21 +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 DAA02544 for ; Fri, 4 Oct 2002 03:39:19 +0200 (MET DST) Received: from grover.msi.co.jp ([192.51.53.141]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g941dI516409 for ; Fri, 4 Oct 2002 03:39:18 +0200 (MET DST) Received: from localhost [127.0.0.1] (ikeda) by grover.msi.co.jp with esmtp (Exim 3.12 #1 (Debian)) id 17xHQy-0007Iw-00; Fri, 04 Oct 2002 10:39:16 +0900 To: caml-list@inria.fr Subject: Re: [Caml-list] Data_custom_val() In-Reply-To: <15771.65438.985931.420887@karryall.dnsalias.org> References: <20021003135922G.ikeda@msi.co.jp> <15771.65438.985931.420887@karryall.dnsalias.org> X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20021004103916I.ikeda@msi.co.jp> Date: Fri, 04 Oct 2002 10:39:16 +0900 From: IKEDA Katsumi X-Dispatcher: imput version 990905(IM130) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, From: Olivier Andrieu Message-ID: <15771.65438.985931.420887@karryall.dnsalias.org> > > You don't need to call malloc, alloc_custom can allocate the space for > you : > > CAMLprim value ocaml_foo_record(value unit) > { > CAMLparam1(unit); > value block; > char **data; > block = alloc_custom(&ops, 1024 * 1024 , 1024 * 1024, 100); > data = Data_custom_val(block); > /* store something in the block using *data ... */ > CAMLreturn(block); > } I understand. Thanks. -- IKEDA Katsumi ------------------- 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