summaryrefslogtreecommitdiffstats
path: root/src/ckh.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-11-08 01:21:12 (GMT)
committerJason Evans <jasone@canonware.com>2016-11-08 01:21:12 (GMT)
commit0110fa8451af905affd77c3bea0d545fee2251b2 (patch)
treebb6683029386303f8474765409f26aad2d7cb821 /src/ckh.c
parent9bef119b42d2d5041621f975177fb7dc20fc447c (diff)
parentb0f56583b7f7abcdc00df42a0ae102bc64c5bd72 (diff)
downloadjemalloc-4.3.1.zip
jemalloc-4.3.1.tar.gz
jemalloc-4.3.1.tar.bz2
Merge branch 'rc-4.3.1'4.3.1
Diffstat (limited to 'src/ckh.c')
-rw-r--r--src/ckh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ckh.c b/src/ckh.c
index 3be671c..159bd8a 100644
--- a/src/ckh.c
+++ b/src/ckh.c
@@ -99,7 +99,8 @@ ckh_try_bucket_insert(ckh_t *ckh, size_t bucket, const void *key,
* Cycle through the cells in the bucket, starting at a random position.
* The randomness avoids worst-case search overhead as buckets fill up.
*/
- offset = (unsigned)prng_lg_range(&ckh->prng_state, LG_CKH_BUCKET_CELLS);
+ offset = (unsigned)prng_lg_range_u64(&ckh->prng_state,
+ LG_CKH_BUCKET_CELLS);
for (i = 0; i < (ZU(1) << LG_CKH_BUCKET_CELLS); i++) {
cell = &ckh->tab[(bucket << LG_CKH_BUCKET_CELLS) +
((i + offset) & ((ZU(1) << LG_CKH_BUCKET_CELLS) - 1))];
@@ -141,7 +142,7 @@ ckh_evict_reloc_insert(ckh_t *ckh, size_t argbucket, void const **argkey,
* were an item for which both hashes indicated the same
* bucket.
*/
- i = (unsigned)prng_lg_range(&ckh->prng_state,
+ i = (unsigned)prng_lg_range_u64(&ckh->prng_state,
LG_CKH_BUCKET_CELLS);
cell = &ckh->tab[(bucket << LG_CKH_BUCKET_CELLS) + i];
assert(cell->key != NULL);