Commit 64d8f3fd authored by Jason Rahman's avatar Jason Rahman Committed by Facebook GitHub Bot

Fix incorrect purging in MemoryIdler

Summary:
When the given deadline to futexWaitUntil() is less than the idle
timeout that controls purging, MemoryIdler should not purge JEMalloc arenas.
Fix a bug where if the deadline is less than the idle timeout, purging happens
100% of the time unconditionally.

Reviewed By: mogeb, davidtgoldblatt, jalatif

Differential Revision: D26784786

fbshipit-source-id: 316ef96658d0cc2263b973b0b7c345605784eb36
parent e37262d4
...@@ -197,6 +197,9 @@ struct MemoryIdler { ...@@ -197,6 +197,9 @@ struct MemoryIdler {
_ret = rv; _ret = rv;
return true; return true;
} }
} else {
// deadline is before the idle timeout, never flush in this case
return false;
} }
} }
......
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