ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] g_mem-chunk_destroy does not free memory for GLib > 2.8

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Sun, 11 Oct 2009 09:31:40 -0400
Kovarththanan Rajaratnam wrote:
Hey Bill,


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.


Using se_alloc is the conclusion I came to.... (when the code frees GMemChunk memory per-capture).

However: packet-isakmp destroys GMemChunks more often. I haven't yet looked at the other dissectors (and other code) using GMemChunks to see if there are other cases wherein GMemChunks are destroyed more often than every capture.

If so, it occurs to me that it might be quite simple to just allow dissectors & etc to init/alloc/free their own emem_chunks using slightly generalized emem code.....

Bill