Wireshark mailing list archives
[PATCH] Re: Freeing memory of se_alloc'ated object
From: Max <dmitrmax () gmail com>
Date: Mon, 2 May 2011 02:12:39 +0400
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
Attachment:
wireshark-emem-dtor.patch
Description:
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Freeing memory of se_alloc'ated object Max (May 01)
- Re: Freeing memory of se_alloc'ated object Guy Harris (May 01)
- Re: Freeing memory of se_alloc'ated object Max (May 01)
- Re: Freeing memory of se_alloc'ated object Guy Harris (May 01)
- [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 01)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object darkjames-ws (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Jakub Zawadzki (May 03)
- Re: Freeing memory of se_alloc'ated object Max (May 01)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Jeff Morriss (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Guy Harris (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object ronnie sahlberg (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max Dmitrichenko (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Stephen Fisher (May 03)
- Re: Freeing memory of se_alloc'ated object Guy Harris (May 01)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Jeff Morriss (May 03)