English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
What should the "size" in "caml_alloc_custom" be?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-05-17 (18:00)
From: lyn HONG <lynxiamen@g...>
Subject: What should the "size" in "caml_alloc_custom" be?
Hi all,

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?