Browse thread
Caml interface with C on x86_64
[
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: | 2006-03-13 (15:13) |
From: | Markus Mottl <markus.mottl@g...> |
Subject: | Re: [Caml-list] Allocating caml lists from C : possible bug on amd64 |
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