Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] memory use questions

Date: Sat, 18 Aug 2012 22:42:43 -0400 (EDT)
In an attempt to minimize g_ allocated memory in the dissectors, I have the following questions/observations:

1. Is there any advantage to a dissector having a "make printable string" function (basically allocating memory to walk a tvb picking out "printable" characters and leaving the rest as ".")?  Does this make filtering on strings easier?  Seems like a waste to me (and that proto_tree_add_item would work just fine)

2. What type of memory should be used when passing a buffer to tvb_new_child_real_data?  The description comments suggest its "per frame", which says to me ep_ memory could be used, but I wasn't sure how/if fragmentation was involved, if it was better off as se_ memory?  Any reason for using g_ memory?
2a. Does setting a data source for the tvb affect the choice?

3. Is there any validity to the argument of using g_ memory because a dissector can control when the memory is freed, to prevent the "session memory" from getting too large (from say, fragmented packets)?

4. It would be helpful if there was a se_hash_table_new (and related) API.  Working under the assumption that hash tables are "more efficient/faster" than the current "se_ tree" API