summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/hash.h
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2012-05-12 00:48:33 (GMT)
committerJason Evans <jasone@canonware.com>2012-05-12 00:48:33 (GMT)
commitfc9b1dbf69f59d7ecfc4ac68da9847e017e1d046 (patch)
tree7f843c7c51cd5df5d3be1ca48f504325f0536c0d /include/jemalloc/internal/hash.h
parentfc1bb70e5f0d9a58b39efa39cc549b5af5104760 (diff)
parentcbb71caceb1e53d0fd21284ce298885327c211b4 (diff)
downloadjemalloc-3.0.0.zip
jemalloc-3.0.0.tar.gz
jemalloc-3.0.0.tar.bz2
Merge branch 'dev'3.0.0
Conflicts: ChangeLog include/jemalloc/internal/chunk.h src/chunk.c src/huge.c src/jemalloc.c test/rallocm.c
Diffstat (limited to 'include/jemalloc/internal/hash.h')
-rw-r--r--include/jemalloc/internal/hash.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/jemalloc/internal/hash.h b/include/jemalloc/internal/hash.h
index 8a46ce3..2f501f5 100644
--- a/include/jemalloc/internal/hash.h
+++ b/include/jemalloc/internal/hash.h
@@ -26,7 +26,7 @@ uint64_t hash(const void *key, size_t len, uint64_t seed);
JEMALLOC_INLINE uint64_t
hash(const void *key, size_t len, uint64_t seed)
{
- const uint64_t m = 0xc6a4a7935bd1e995LLU;
+ const uint64_t m = UINT64_C(0xc6a4a7935bd1e995);
const int r = 47;
uint64_t h = seed ^ (len * m);
const uint64_t *data = (const uint64_t *)key;
@@ -48,14 +48,14 @@ hash(const void *key, size_t len, uint64_t seed)
data2 = (const unsigned char *)data;
switch(len & 7) {
- case 7: h ^= ((uint64_t)(data2[6])) << 48;
- case 6: h ^= ((uint64_t)(data2[5])) << 40;
- case 5: h ^= ((uint64_t)(data2[4])) << 32;
- case 4: h ^= ((uint64_t)(data2[3])) << 24;
- case 3: h ^= ((uint64_t)(data2[2])) << 16;
- case 2: h ^= ((uint64_t)(data2[1])) << 8;
- case 1: h ^= ((uint64_t)(data2[0]));
- h *= m;
+ case 7: h ^= ((uint64_t)(data2[6])) << 48;
+ case 6: h ^= ((uint64_t)(data2[5])) << 40;
+ case 5: h ^= ((uint64_t)(data2[4])) << 32;
+ case 4: h ^= ((uint64_t)(data2[3])) << 24;
+ case 3: h ^= ((uint64_t)(data2[2])) << 16;
+ case 2: h ^= ((uint64_t)(data2[1])) << 8;
+ case 1: h ^= ((uint64_t)(data2[0]));
+ h *= m;
}
h ^= h >> r;