[zeromq-dev] On hooking memory allocations
Michel Pelletier
pelletier.michel at gmail.com
Tue Nov 29 20:16:02 CET 2016
On Tue, Nov 29, 2016 at 12:17 AM, Auer, Jens <jens.auer at cgi.com> wrote:
> Hi,
>
> A memory-pool with fixed blocks for incoming messages is exactly what I
> have in mind. E.g. in my application, I receive messages of ~1kb at a rate
> of 10000/s. Right now with ZeroMQ 4.1, this is done by receiving from the
> socket into a fixed 8k buffer and then allocating a message with a buffer
> of 1kb where the data is copied.
You might want to consider using an allocation management library like the
Boehm garbage collector:
http://www.hboehm.info/gc/
It's very good at pooling and is very efficient. In addition it can be
used as a leak detection tool and can be used as a drop in replacement for
new/malloc/realloc without code changes.
-Michel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20161129/db85d105/attachment.htm>
More information about the zeromq-dev
mailing list