[zeromq-dev] ØMQ VSM data alignment
andrew at research.att.com
Thu Aug 5 12:54:24 CEST 2010
indeed, this is an old trick. (the actual trick is making the first
word after the buffer
be some marker like 0xdeadbeef and verifying it befor e using the
the other problem not mentioned here is that of different alignments.
for example, using direct i/o on SGIs required page-alignment of
in this case, i can force alignment of my buffer before i give it to
but what makes the receiver do so?
maybe this doesn't matter overall, or is asking too much of zeromq.
or maybe there could be a plugin to force alignment?
martin, has this issue ever come up with your customers?
On Aug 5, 2010, at 6:30 AM, Matt Weinstein wrote:
> A nice side effect - if you overwrite the end of the VSM you'll
> know PDQ
> 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*>
>>> cout << "Works like magic: " << pstruct->member << ". All your
>>> 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
>> 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
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
Andrew Hume (best -> Telework) +1 732-886-1886
andrew at research.att.com (Work) +1 973-360-8651
AT&T Labs - Research; member of USENIX and LOPSA
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev