Thanks I think I have some Ideas to try, On Thu, Apr 14, 2016 at 7:08 AM, Auer, Jens <[email protected]> wrote:
> Hi, > > there is zmq_msg_init_data which gets a callback which is called when the > message is released. However, it is not fully zero-copy because some > copying is done when receiving messages. With 4.2, this is reduced, but > until that, the data is received into a fixed buffer and then copied into > the message. > > That all reminds me that I wanted to add the possibility to use custom > allocator functions to be able to use a memory pool. I think it should be > possible, e.g. by setting function pointers as zmq context options, plus > void* hint that can be set too. > > Cheers, > Jens > > -- > *Jens Auer *| CGI | Software-Engineer > CGI (Germany) GmbH & Co. KG > Rheinstraße 95 | 64295 Darmstadt | Germany > T: +49 6151 36860 154 > *[email protected]* <[email protected]> > Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie unter > *de.cgi.com/pflichtangaben* <http://de.cgi.com/pflichtangaben>. > > CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging to > CGI Group Inc. and its affiliates may be contained in this message. If you > are not a recipient indicated or intended in this message (or responsible > for delivery of this message to such person), or you think for any reason > that this message may have been addressed to you in error, you may not use > or copy or deliver this message to anyone else. In such case, you should > destroy this message and are asked to notify the sender by reply e-mail. > ------------------------------ > *Von:* [email protected] [ > [email protected]]" im Auftrag von "Jeff Shanab [ > [email protected]] > *Gesendet:* Donnerstag, 14. April 2016 12:06 > *An:* ZeroMQ development list > *Betreff:* [zeromq-dev] Memory management > > I am writing an app in C++ and using libzmq directly, not much of the c++ > wrapper stuff. > > I am interested in zero copy or at least minimizing the number of copies > of large buffers. > > But am running across an all too common issue, Each library used wants to > have their own memory management forcing me to copy between the systems. > > Is there a way I could use boost shared_ptr<zmq_msg_t> with the functions > so ZMQ could dereference/delete after the send? > > In fact is there a way to hook into the system and get a callback when it > goes to delete with the client pointer so I can delete or return it to a > pool? > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
