[zeromq-dev] Important: backward incompatible changes for 0MQ/3.0!

Paul Colomiets tailhook at yandex.ua
Wed Mar 30 01:03:02 CEST 2011


>
> Btw, note that once a connection is established, the number of
> allocations is highly optimised. In ideal case, 0mq should be able to
> run with zero allocations from that point on. It's the remaining
> out-of-critical-path code that is responsible for almost all the
> allocations.

Well.. what about zmq_msg_init_data/zmq_msg_init_size?

And I'd like to discuss custom allocations for message bodies.
Somebody wanted to allocate memory on a shared pool. I'd also like
to overallocate message body buffer, and add some bookkeeping info,
so I don't need to move message to another place later.

It would be great if API is based on setsockopt if that is at all possible
(yes I really mean socket-specific). For allocating outgoing messages
zmq_msg_init_data is mostly ok apart from allocating zmq_content_t,
which is probably not that bad, if memory allocator is smart enought.

--
Paul



More information about the zeromq-dev mailing list