Wireshark mailing list archives

Re: g_mem-chunk_destroy does not free memory for GLib > 2.8


From: Kovarththanan Rajaratnam <kovarththanan.rajaratnam () gmail com>
Date: Sun, 11 Oct 2009 11:52:18 +0200

Hey Bill,

Bill Meier wrote:
If there is no simple way to free up what may be an array of many 
multiple slices, I'm inclined to replace the use of GMemChunk (at least 
for those cases) by the use of GArray.

After a quick look, one concern I have is about constantly extending a 
GArray thus causing a copy each time. I note that it does seem that 
space for multiple entries can be pre-allocated. So: a wrapper for 
GArray could be coded which more or less does what I GMemChunk used to 
do. Or: does GArray have some builtin optimization ?


Comments ?
(or: what am I missing as to the best way to replace the use of 
GMemChunk ?).

Is there any reason why we couldn't use se_alloc and friends? This 
should be faster now that we're defaulting to _not_ use canaries for 
seasonal memory.

-- 
Best regards,
Kovarththanan Rajaratnam


___________________________________________________________________________
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: