diff options
author | Evan Huus <eapache@gmail.com> | 2014-04-20 17:27:18 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-04-21 15:37:06 +0000 |
commit | d47ae54806201a868b7e012e52d1bab19b78ae06 (patch) | |
tree | a5f6bd1a761ee2c1545eeae3fa8f0e934315caec /ui/gtk/filter_autocomplete.c | |
parent | 5983cda769fa6615dda5fc7b8f87819d40f0a8d5 (diff) |
Replace linked list of proto fields with array
This is substantially more memory-efficient, shaving another ~1.5MB off our base
usage. It also lets us remove the annoying extra "last_field" pointer and
simplify proto_register_field_common(). It also accidentally fixed what may
have been a memory leak in proto_unregister_field().
It unfortunately complicates proto_get_next_protocol_field() to require
refetching the protocol each time, but that is itself just an array-lookup under
the covers (and isn't much used), so I don't expect the performance hit to be
noticable.
Change-Id: I8e1006b2326d6563fc3b710b827cc99b54440df1
Reviewed-on: https://code.wireshark.org/review/1225
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'ui/gtk/filter_autocomplete.c')
-rw-r--r-- | ui/gtk/filter_autocomplete.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/gtk/filter_autocomplete.c b/ui/gtk/filter_autocomplete.c index 3978bc04e3..91048aa052 100644 --- a/ui/gtk/filter_autocomplete.c +++ b/ui/gtk/filter_autocomplete.c @@ -657,7 +657,7 @@ build_autocompletion_list(GtkWidget *filter_te, GtkWidget *treeview, GtkWidget * for (hfinfo = proto_get_first_protocol_field(i, &cookie2); hfinfo != NULL; - hfinfo = proto_get_next_protocol_field(&cookie2)) + hfinfo = proto_get_next_protocol_field(i, &cookie2)) { if (hfinfo->same_name_prev_id != -1) /* ignore duplicate names */ continue; |