Browse thread
What should the "size" in "caml_alloc_custom" be?
-
lyn HONG
- Goswin von Brederlow
- Richard Jones
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2010-05-20 (22:04) |
From: | Richard Jones <rich@a...> |
Subject: | Re: [Caml-list] What should the "size" in "caml_alloc_custom" be? |
On Mon, May 17, 2010 at 02:00:28PM -0400, lyn HONG wrote: > I have a question about "allocating custom blocks" in "iterfacing C with > object Ocaml". when we call function "caml_alloc_custom(ops, size, used, > max)" in the C side, if the structure we want to allocate has a pointer, is > the "size" going to be size of the structure itself only, or should we also > include the memory block that pointer points to? This example code might be helpful: http://oirase.annexia.org/libguestfs-1.3.13/ocaml/guestfs_c.c.html and more here: http://oirase.annexia.org/libguestfs-1.3.13/ocaml/ Rich. -- Richard Jones Red Hat