[zeromq-dev] Memory management
Martin Sustrik
sustrik at fastmq.com
Fri May 15 10:20:02 CEST 2009
Steven McCoy wrote:
> 2009/5/15 Martin Sustrik <sustrik at fastmq.com <mailto:sustrik at fastmq.com>>
>
> Ok, I see. However, if tx/rx are stored in a single preallocated
> chunk of memory, it ceases to be a problem as all the memory
> allocation is done in advance, no?
>
>
> Each page still has to be accessed at least once, but that can be done
> with the initial allocation. It could also be pinned with mlock() but
> that seems a little overkill.
Yup. I would expect that if the cyclical buffer is used over and over
again, the OS would be clever enough to keep it in physical memory anyway.
Martin
More information about the zeromq-dev
mailing list