On Sun, Jul 28, 2013 at 6:47 AM, <darkjames@xxxxxxxxxxxxx> 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.