From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 13DACBBAF for ; Mon, 17 May 2010 20:00:31 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmIEAEsg8UvRVdQ0emdsb2JhbACRd4t6CBUBARQkAx+scoIAhSIuiE4BAQMFhQsE X-IronPort-AV: E=Sophos;i="4.53,248,1272837600"; d="scan'208";a="59512023" Received: from mail-vw0-f52.google.com ([209.85.212.52]) by mail1-smtp-roc.national.inria.fr with ESMTP; 17 May 2010 20:00:30 +0200 Received: by vws5 with SMTP id 5so1255192vws.39 for ; Mon, 17 May 2010 11:00:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=eSRAU0UcPnRYxYSD8fh1mL0vX66VU0QPeuIJJa4LEgM=; b=XKQzDf7iB1SAKOQ2f63gaDGQnN472SFdHWPYC3v8i57UmlVIDJeuszn0yPpFi9TRAm DfTyRThbXKTib8i3zYarKR18+IpsTM3zhzmvRtFM7onZ1Axo5GojZcQM6+gMwoLQlMk5 6SXOKoQlK43UyLKEnFZzyUiiKalZ6jQlZmPsU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=NQM1nhNrLWM/WX2CUO2zGWkOOj/qAAebiapFjhFpeKxJTNvovJ8u7CN4MHiuKOTCNj OZsar2BS0eu8yzRH4NDlZtx2gJdNMP9Br80mriR3N2GD4f8PWQIvgZmHNzFT76wtYQsO HdZ0kMce9ZktSfE38J+bELxq+P4+/ydhmtTyg= MIME-Version: 1.0 Received: by 10.229.250.17 with SMTP id mm17mr1192696qcb.157.1274119228888; Mon, 17 May 2010 11:00:28 -0700 (PDT) Received: by 10.229.87.81 with HTTP; Mon, 17 May 2010 11:00:28 -0700 (PDT) Date: Mon, 17 May 2010 14:00:28 -0400 Message-ID: Subject: What should the "size" in "caml_alloc_custom" be? From: lyn HONG To: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=0016363101f30a18860486ce0002 X-Spam: no; 0.00; alloc:01 allocating:01 ocaml:01 alloc:01 pointer:01 pointer:01 caml:02 caml:02 ops:03 ops:03 size:95 size:95 hong:94 max:06 max:06 --0016363101f30a18860486ce0002 Content-Type: text/plain; charset=ISO-8859-1 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? Thanks, Lin --0016363101f30a18860486ce0002 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 struct= ure we want to allocate has a pointer, is the "size"=A0 going to = be size of the structure itself only, or should we also include the memory = block that pointer points to?

Thanks,
Lin


--0016363101f30a18860486ce0002--