On Mon, Sep 30, 2013 at 1:05 PM, gonzalo diethelm <[email protected]> wrote:

>     zmq_msg_t msg;
>     zmq_msg_init (&msg);
>     zmq_recvmsg ((void *) socket, &msg, flags);
>     int size = zmq_msg_size (&msg);
>     void *data = malloc(size);

The zmq_recvmsg allocates the data once, and then there's a second
allocation, and a copy (missing in your code). I'm wondering if there
would not be a way to avoid the extra copy.

-Pieter
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to