Wireshark-commits: [Wireshark-commits] master d47ae54: Replace linked list of proto fields with arr
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 21 Apr 2014 15:37:07 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=d47ae54806201a868b7e012e52d1bab19b78ae06
Submitter: Evan Huus (eapache@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

d47ae54 by Evan Huus (eapache@xxxxxxxxx):

    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@xxxxxxxxxxxx>
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    

Actions performed:

    from  5983cda   Replace a GTree with a GHashTable
    adds  d47ae54   Replace linked list of proto fields with array


Summary of changes:
 epan/proto.c                   |   51 +++++++++++++++++-----------------------
 epan/proto.h                   |    4 ++--
 epan/wslua/wslua_field.c       |    2 +-
 ui/gtk/filter_autocomplete.c   |    2 +-
 ui/gtk/proto_hier_tree_model.c |   11 +++++----
 ui/gtk/supported_protos_dlg.c  |    6 ++---
 6 files changed, 35 insertions(+), 41 deletions(-)