commit | 4a3907617f95f5d31e41978b7adf3ca42330ff5e | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Wed Sep 07 10:56:03 2022 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Thu Sep 08 14:19:15 2022 +0200 |
tree | 9c7b2f380fc6bcff2a4c5e182310ad1fe0078d12 | |
parent | 6a28a30efaa8d6f6355cc4b1e9c8b5aeded661e4 [diff] |
MINOR: tools: add generic pointer hashing functions There are a few places where it's convenient to hash a pointer to compute a statistics bucket. Here we're basically reusing the hash that was used by memory profiling with a minor update that the multiplier was corrected to be prime and stand by its promise to have equal numbers of 1 and 0, and that 32-bit platforms won't lose range anymore. A two-pointer variant was also added.