[zeromq-dev] C++ Move Constructor and Assignment Operator
christoph.heindl at gmail.com
Thu Feb 14 10:43:09 CET 2013
On Thu, Feb 14, 2013 at 10:14 AM, <Richard_Newton at waters.com> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev