[zeromq-dev] ØMQ VSM data alignment
matt_weinstein at yahoo.com
Thu Aug 5 12:15:07 CEST 2010
Whoops gotta watch for the void*
And putting it second may not guarantee void* enforced the proper alignment
Sorry still early here :-)
On Aug 5, 2010, at 6:08 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Matt Weinstein wrote:
>> Yes, but I want to do this:
>> zmq::message_t foo;
>> my_struct const* pstruct = reinterpret_cast<my_struct const*>(foo.data());
>> cout << "Works like magic: " << pstruct->member << ". All your processor
>> are belong to Intel! (*)" << endl;
>> That's the no-copy approach :-)
>> I can do it with malloc() without issue or penalty...
> Fair enough. Thus kind of stuff would break on RISC architectures such
> as SPARC.
> What about having VSM buffer as the first member of zmq_msg_t?
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
More information about the zeromq-dev