diff options
author | Oran Agra <oran@redislabs.com> | 2018-05-17 09:52:00 +0300 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2018-05-17 09:52:00 +0300 |
commit | ad133e10238eed678694160dc0eecd70c30d0232 (patch) | |
tree | a22109986ff788e0219636479d08e5723730e0e4 /deps/jemalloc | |
parent | 25f017e563c0e1ef9837604a96e4655b021bad32 (diff) | |
download | redis-ad133e10238eed678694160dc0eecd70c30d0232.tar.gz |
Active defrag fixes for 32bit builds
problems fixed:
* failing to read fragmentation information from jemalloc
* overflow in jemalloc fragmentation hint to the defragger
* test suite not triggering eviction after population
Diffstat (limited to 'deps/jemalloc')
-rw-r--r-- | deps/jemalloc/src/jemalloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/deps/jemalloc/src/jemalloc.c b/deps/jemalloc/src/jemalloc.c index fe77c2475..54a3b1ba1 100644 --- a/deps/jemalloc/src/jemalloc.c +++ b/deps/jemalloc/src/jemalloc.c @@ -2614,8 +2614,8 @@ je_get_defrag_hint(void* ptr, int *bin_util, int *run_util) { if (chunk != (arena_chunk_t *)CHUNK_ADDR2BASE(bin->runcur)) { arena_bin_info_t *bin_info = &arena_bin_info[run->binind]; size_t availregs = bin_info->nregs * bin->stats.curruns; - *bin_util = (bin->stats.curregs<<16) / availregs; - *run_util = ((bin_info->nregs - run->nfree)<<16) / bin_info->nregs; + *bin_util = ((long long)bin->stats.curregs<<16) / availregs; + *run_util = ((long long)(bin_info->nregs - run->nfree)<<16) / bin_info->nregs; defrag = 1; } malloc_mutex_unlock(&bin->lock); |