Wireshark-commits: [Wireshark-commits] master 521bab1: Use sized strbufs when extracting tvb string
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 29 Mar 2014 20:01:20 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=521bab1e1c5fadc07e32d73c393cbf1b0f0f942d
Submitter: Evan Huus (eapache@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

521bab1 by Evan Huus (eapache@xxxxxxxxx):

    Use sized strbufs when extracting tvb strings
    
    We rarely know exactly how long a string will be, but we frequently have a good
    lower bound (that's better than the default strbuf size of 16). Starting at that
    size probably reduces the amount of allocation/copying needed.
    
    Also make use of the new _finalize() method to save memory and avoid constness
    problems.
    
    Change-Id: I3f043bd12c1ccfce5990168fb6531ecd287bec5b
    Reviewed-on: https://code.wireshark.org/review/856
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    

Actions performed:

    from  7df8839   Splay tree implementation for wmem
    adds  521bab1   Use sized strbufs when extracting tvb strings


Summary of changes:
 epan/tvbuff.c |   52 +++++++++++++++++++---------------------------------
 1 file changed, 19 insertions(+), 33 deletions(-)