diff options
author | Evan Huus <eapache@gmail.com> | 2014-04-21 20:30:06 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-04-23 12:42:26 +0000 |
commit | 9ba4c6e0916a9a40885827864da6353e1572e3b6 (patch) | |
tree | 5d63f5cd97ceecacf6abc31533a5f663b881c0fd /epan/CMakeLists.txt | |
parent | 268104a1ddd476632b84008f33f70ec11cd95fc3 (diff) |
Hash map implementation for wmem.
This has two expected uses:
- Many current users of wmem_tree don't actually need the predecessor lookup
it provides (the lookup_le function family). A hash map provides straight
insertion and lookup much more efficiently than a wmem_tree when predecessor
lookup isn't needed.
- Many current users of glib's hash table and hash functions use untrusted data
for keys, making them vulnerable to algorithmic complexity attacks. Care has
been taken to make this implementation secure against such attacks, so it
should be used whenever data is untrusted.
In my benchmarks it is measurably slower than GHashTable, but not excessively
so. Given the additional security it provides this seems like a reasonable
trade-off (and it is still faster than a wmem_tree).
Change-Id: I2d67a0d06029f14c153eaa42d5cfc774aefd9918
Reviewed-on: https://code.wireshark.org/review/1272
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/CMakeLists.txt')
-rw-r--r-- | epan/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 8745ab9290..93bd7c22ca 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -1464,6 +1464,7 @@ set(WMEM_FILES wmem/wmem_allocator_simple.c wmem/wmem_allocator_strict.c wmem/wmem_list.c + wmem/wmem_map.c wmem/wmem_miscutl.c wmem/wmem_scopes.c wmem/wmem_stack.c |