From: "Markus Mottl" <markus.mottl@gmail.com>
To: "Sayan (Sébastien Li-Thiao-Té)" <sayan@crans.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Allocating caml lists from C : possible bug on amd64
Date: Mon, 13 Mar 2006 10:13:14 -0500 [thread overview]
Message-ID: <f8560b80603130713v360ebbb8ud69b406816134110@mail.gmail.com> (raw)
In-Reply-To: <44158770.6000407@crans.org>
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
On 3/13/06, "Sayan (Sébastien Li-Thiao-Té)" <sayan@crans.org> wrote:
>
> I am trying to learn how to allocate a list in C and pass the result to
> Caml on an opteron Debian box. Here is the function that I use :
Your function does not protect "str" from being reclaimed by the GC (which
can happen in "caml_alloc_small"), and you should use the Field-macro only
to overwrite the contents of the cons-block in this particular case, because
you had used "caml_alloc_small" as allocation function, and there was no
intermediate allocation.
Regards,
Markus
--
Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
[-- Attachment #2: Type: text/html, Size: 1130 bytes --]
next prev parent reply other threads:[~2006-03-13 15:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-08 22:06 Caml interface with C on x86_64 Li-Thiao-Té Sébastien
2006-03-13 14:53 ` Allocating caml lists from C : possible bug on amd64 "Sayan (Sébastien Li-Thiao-Té)"
2006-03-13 15:13 ` Markus Mottl [this message]
2006-03-13 15:54 ` [Caml-list] " "Sayan (Sébastien Li-Thiao-Té)"
2006-03-13 16:39 ` Markus Mottl
2006-03-13 17:42 ` Xavier Leroy
2006-03-13 18:05 ` Li-Thiao-Té Sébastien
2006-03-13 18:53 ` Markus Mottl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f8560b80603130713v360ebbb8ud69b406816134110@mail.gmail.com \
--to=markus.mottl@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=sayan@crans.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox