Wireshark mailing list archives

Re: [Wireshark-commits] rev 50967: /trunk/epan/ /trunk/epan/: proto.c


From: Evan Huus <eapache () gmail com>
Date: Sun, 28 Jul 2013 08:33:49 -0400

On Sun, Jul 28, 2013 at 6:47 AM,  <darkjames () wireshark org> wrote:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=50967

User: darkjames
Date: 2013/07/28 03:47 AM

Log:
 Store protocol fields in single linked list, saves about 1 MB of memory.

Directory: /trunk/epan/
  Changes    Path          Action
  +12 -11    proto.c       Modified

Neat.

I was poking through this change and I noticed that all three places
that call proto_unregister_field (which is very inefficient at the
moment, possibly traversing the entire linked list twice) do so in a
loop for all their hfs, so I was wondering if it makes sense to
replace it with a proto_unregister_all_fields that just removes the
whole list? I'm not sure if we want to leave proto_unregister_field
around or not in case somebody actually needs it in the future - the
data structures aren't really designed for that operation.
___________________________________________________________________________
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: