Wireshark mailing list archives

Re: [Wireshark-commits] rev 44559: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-sctp.c


From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Mon, 20 Aug 2012 11:25:19 -0400

mmann () wireshark org wrote:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=44559

User: mmann
Date: 2012/08/17 07:55 PM

Log:
 Use capture scoped memory for hash table functionality

Directory: /trunk/epan/dissectors/
  Changes    Path             Action
  +6 -58     packet-sctp.c    Modified

I had looked at doing something similar before but I discovered a good reason not to: now (with this change) the SCTP dissector will keep *2* copies of each fragment until the file is closed: once for each individual fragment and another one once the reassembly is done. IOW in this case there seemed to be a good reason for using g_malloc()'d memory: so we can free the (temporary) copies of the fragments once the reassembly is done (which should be well before the capture file is closed).

(That's not to say this method is the best; ideally we wouldn't have to do all this allocating + copying + freeing but I've never been inspired to try to solve that problem.)
___________________________________________________________________________
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: