Commit d2f85c15 authored by Dave Watson's avatar Dave Watson Committed by Facebook Github Bot 1

Fix narenas size

Summary:Changed from size_t to unsigned in a recent tp2 update
https://github.com/jemalloc/jemalloc/blame/3c07f803aa282598451eb0664cc94717b769a5e6/test/unit/mallctl.c

Reviewed By: jasone, mhlakhani

Differential Revision: D2991755

fb-gh-sync-id: 46f2be722a30706333eac6428f4183ca9cb85543
shipit-source-id: 46f2be722a30706333eac6428f4183ca9cb85543
parent aa8dce11
...@@ -74,11 +74,11 @@ void MemoryIdler::flushLocalMallocCaches() { ...@@ -74,11 +74,11 @@ void MemoryIdler::flushLocalMallocCaches() {
// purging the arenas is counter-productive. We use the heuristic // purging the arenas is counter-productive. We use the heuristic
// that if narenas <= 2 * num_cpus then we shouldn't do anything here, // that if narenas <= 2 * num_cpus then we shouldn't do anything here,
// which detects when the narenas has been reduced from the default // which detects when the narenas has been reduced from the default
size_t narenas; unsigned narenas;
unsigned arenaForCurrent; unsigned arenaForCurrent;
size_t mib[3]; size_t mib[3];
size_t miblen = 3; size_t miblen = 3;
if (mallctlRead<size_t>("opt.narenas", &narenas) == 0 && if (mallctlRead<unsigned>("opt.narenas", &narenas) == 0 &&
narenas > 2 * CacheLocality::system().numCpus && narenas > 2 * CacheLocality::system().numCpus &&
mallctlRead<unsigned>("thread.arena", &arenaForCurrent) == 0 && mallctlRead<unsigned>("thread.arena", &arenaForCurrent) == 0 &&
mallctlnametomib("arena.0.purge", mib, &miblen) == 0) { mallctlnametomib("arena.0.purge", mib, &miblen) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment