[zeromq-dev] Alignment of message.raw_data()
Michi Henning
michi at triodia.com
Fri Sep 6 06:55:17 CEST 2013
Hi,
I'm using ZeroMQ with Cap'n Proto, which requires marshaling data to be
aligned on a 64-bit boundary. However, when I receive a message, like
this, the returned pointer is only byte-aligned:
zmqpp::message msg_in;
auto data = msg_in.raw_data();
assert((long int)data % 8 ==0);
The assertion fails for me. Checking the pointer value indicates that it
points one byte past the end of an 8-byte boundary.
Is there any way to ask ZeroMQ to use 64-bit aligned buffers?
Thanks,
Michi.
More information about the zeromq-dev
mailing list