Hi Richard,

On Thu, Feb 14, 2013 at 10:14 AM, <[email protected]> wrote:

>
> I believe zeromq does this is by design. It copies the data if the message
> size is small and reference counts it if its above a certain size.
>
Ok, I did not know that. Would by interesting to know why. Is ZMQ using
some kind of small buffer optimization, where it uses the first few bytes
of the buffer for reference counter or storing the values if small enough?

>
>
> It looks like the size threshold is specified by the max_vsm_size enum in
> msg.hpp, currently set to 29, so if you make your message size 30 it should
> switch to reference counting.
>
I did and it works. Added both, positive and negative tests.

Thanks for the hint.

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

Reply via email to