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 /src/zmalloc.c | |
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 'src/zmalloc.c')
-rw-r--r-- | src/zmalloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/zmalloc.c b/src/zmalloc.c index 7cb4e3729..31e686c4f 100644 --- a/src/zmalloc.c +++ b/src/zmalloc.c @@ -301,10 +301,13 @@ size_t zmalloc_get_rss(void) { int zmalloc_get_allocator_info(size_t *allocated, size_t *active, size_t *resident) { - size_t epoch = 1, sz = sizeof(size_t); + uint64_t epoch = 1; + size_t sz; *allocated = *resident = *active = 0; /* Update the statistics cached by mallctl. */ + sz = sizeof(epoch); je_mallctl("epoch", &epoch, &sz, &epoch, sz); + sz = sizeof(size_t); /* Unlike RSS, this does not include RSS from shared libraries and other non * heap mappings. */ je_mallctl("stats.resident", resident, &sz, NULL, 0); |