[zeromq-dev] Important: backward incompatible changes for 0MQ/3.0!

gonzalo diethelm gdiethelm at dcv.cl
Fri Mar 25 11:56:06 CET 2011


> > I'm not sure about the hint parameter you mention - can you explain what
> > you mean by that?  I had a user_data parameter in the allocation
> function,
> > but this was passed in by the user of the library.  Your macros look
> like
> > the hint would come from within 0mq...so would we have some well-defined
> > hints that tell the allocator which part of the library the memory is
> for?
> 
> A hint parameter could be used to tell the allocator that the memory block
> might need to grow later, or is fixed size and will never grow.  For fixed
> sized block the allocator can allocate the memory from a packed region,
> for
> grow-able memory blocks the allocator can try to leave some space after
> the
> block for fast resizing.  You may also want to mark some memory as
> temporary
> blocks that will be freed very soon.
> 
> The hint parameter could also identify allocations for message blocks vs.
> other allocations from 0MQ.

Exactly. Basically, a way of giving the allocator more information about this particular allocation.

> Robert G. Jakabosky

Thanks for answering for me... :-)

-- 
Gonzalo Diethelm




More information about the zeromq-dev mailing list