>> In this situation it would >> be perfect if se_alloc() engine could call a callback with a user >> supplied argument before it starts to deallocate anything. > > The init mechanism was created before the ephemeral memory stuff even > existed, and has never been updated. > > Some better mechanism, such as the one you suggest, would probably be a good > idea.
I've developed a patch which implements such a mechanism and would like it to be committed to the trunk. Briefly: it costs one additional pointer per each memory chunk allocated. Plus it costs thee additional pointers per allocation, if allocation is made from pool in chunk mode when destructor is used, otherwise it costs nothing. Callback is supplied as a parameter to allocation function. I would gladly read you comments, critics and suggestions regarding this patch. -- Max
wireshark-emem-dtor.patch
Description: Binary data
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <[email protected]> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:[email protected]?subject=unsubscribe
