Wireshark mailing list archives
Re: New classes of possible memory optimizations
From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Fri, 15 Feb 2013 14:21:14 -0500
Evan Huus wrote:
It is now possible with wmem to free individual allocated chunks (this does not affect the bulk-free that occurs after each packet or file). I don't expect it to be used much directly, however if there are large buffers that are needed only briefly, freeing them immediately afterwards could do good things for Wireshark's memory usage. If an exception is thrown and the free call is never hit, they will still be cleaned up after the packet or file is closed as usual. Also note that wmem supports realloc as well, so things like emem's strbuf now have a much simpler and more efficient way to grow (or shrink) when needed.
This thread: https://www.wireshark.org/lists/wireshark-dev/201208/msg00179.htmlshows a good use case for it. (AFAIK the SCTP dissector is still using double memory when doing reassembly.)
___________________________________________________________________________ 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:
- New classes of possible memory optimizations Evan Huus (Feb 15)
- Re: New classes of possible memory optimizations Jeff Morriss (Feb 15)