On Tue, Nov 29, 2016 at 12:17 AM, Auer, Jens <[email protected]> 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
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to