mirror of
https://github.com/fluencelabs/redis
synced 2025-06-22 21:41:32 +00:00
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
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user