Le Monday 04 Apr 2011 à 13:24:17 (+0100), Pedro Borges a écrit :
> On Mon, Apr 4, 2011 at 12:31 PM, Guillaume Yziquel
> <[email protected]> wrote:
> > Le Monday 04 Apr 2011 à 12:17:01 (+0100), Pedro Borges a écrit :
>
> If I allocate a buffer outside the heap, the buffer from ocaml (a
> string) would have to be memcpy'ed to the buffer.
You can also allocate manually (without the helper functions) an OCaml
string block outside of the GC heap and have it called a string in
OCaml. That would have the benefit of easing the implementation of the
finaliser that you feed to ZeroMQ. Though that needs care when it comes
to checking whether or not the buffer has been invalidated.
You can also allocate an OCaml string block on the call stack. It
requires even more care. I wouldn't dare.
--
Guillaume Yziquel
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev