Wireshark mailing list archives
Re: The RSVD dissector and 32-bit builds ...
From: Richard Sharpe <realrichardsharpe () gmail com>
Date: Mon, 16 Feb 2015 07:33:58 -0800
On Mon, Feb 16, 2015 at 7:11 AM, Evan Huus <eapache () gmail com> wrote:
On Mon, Feb 16, 2015 at 10:08 AM, Richard Sharpe <realrichardsharpe () gmail com> wrote:On Mon, Feb 16, 2015 at 6:55 AM, Evan Huus <eapache () gmail com> wrote:Create the wmem_map using g_int64_equal instead of g_direct_equal and wmem_int64_hash instead of g_direct_hash. Create a wmem_file_scope() copy of the key, and pass the resulting pointer to the insert function.Hmmm, why do we need a wmem_file_scope() copy of the key? We get the key in each request and response and I don't store the key anywhere.The map itself has to store the key in order to use it for future lookups. When the key is only 32 bits you can make the pointer itself store the key, and since the pointer gets copied you don't need an explicit copy of the key. But when the pointer is just a pointer, you need a file-scope copy of the key.
OK, I assumed that the map always copied the key ... Since the key comes from a guint64 that comes straight from the capture that should be easy. -- Regards, Richard Sharpe (何以解憂?唯有杜康。--曹操) ___________________________________________________________________________ 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:
- The RSVD dissector and 32-bit builds ... Richard Sharpe (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Evan Huus (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Richard Sharpe (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Evan Huus (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Martin Mathieson (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Richard Sharpe (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Richard Sharpe (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Richard Sharpe (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Pascal Quantin (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Richard Sharpe (Feb 16)
- Re: The RSVD dissector and 32-bit builds ... Evan Huus (Feb 16)