[zeromq-dev] How to reuse a message in zeromq?

kaka chen kaka11.chen at gmail.com
Mon Aug 1 15:16:37 CEST 2011


Hi All:

    From source code of zeromq, I found it writes message to outbound pipe,
the ownership is transfered to pipe, and the original message was
re-initialized to a empty size message by zmq_msg_init(1). This strategy
prevent me to reuse a message for test because I can not manage this
message's life-cycle and the pipe will manage it. So I can not test 1M size
message for looping 10000 times, it will occur mem allocate problems. Is it
has some method to reuse a message in zeromq? what about try to use
ref-count when writing message
to outbound pipe by override operator = () function in message_size_t.

Kaka Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110801/efbb5624/attachment.htm>


More information about the zeromq-dev mailing list