Wireshark mailing list archives

Re: emem -> wmem conversion status and next steps


From: Evan Huus <eapache () gmail com>
Date: Fri, 20 Sep 2013 18:16:52 -0400

On 2013-09-20, at 5:55 PM, Pascal Quantin <pascal.quantin () gmail com> wrote:

Hi all,

the easy part of the conversion from emem to wmem memory should be almost complete now: dissectors and plugins use 
the new memory manager (with the exception of uat / initialization routines).

Next, I was thinking about converting our helper functions found in epan module and the various ep_ and se_ functions.
My idea was to update (and rename!) those functions with the following scheme:
tvb_get_ephemeral_string -> tvb_get_wmem_packet_string
tvb_get_seasonal_string -> tvb_get_wmem_file_string
and adding defines to maintain (temporarily?) backward compatibility:
#define tvb_get_ephemeral_string tvb_get_wmem_packet_string
#define tvb_get_seasonal_string tvb_get_wmem_file_string

Of course we will discover some misuse of ep/se memory (like for uat) that will require more thinking, but it would 
be one step forward.


I was hoping (at least for functions with both an ep and se version) to make the pool a parameter, so for example

tvb_get_string(pool, ...)

This can also replace the glib versions of such functions automatically by passing NULL as the pool (wmem provides this 
"for free").

The macros are a good idea.

Thoughts?

Regards,
Pascal.
___________________________________________________________________________
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
___________________________________________________________________________
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: