bionic
Révision | 5cda74e065761bbeccf7ff61d7a3131bdf6490d0 (tree) |
---|---|
l'heure | 2019-07-09 11:16:31 |
Auteur | Christopher Ferris <cferris@goog...> |
Commiter | Christopher Ferris |
Do not check tcache clear when doing a purge.
On systems where the tcache is disabled, the tcache clear option will
fail, and not really do a purge.
Bug: 137037462
Bug: 136236080
Test: Built taimen as malloc svelte and verified the M_PURGE mallopt
Test: call failed before this fix and passes afterwards.
Change-Id: Ib30e5f3e083a9c6d046adff30f2aa7eacaf6df10
Merged-In: Ib30e5f3e083a9c6d046adff30f2aa7eacaf6df10
(cherry picked from commit 3d0bafb945bc9e39ddc84a0167e713b8e70dc135)
@@ -107,9 +107,8 @@ int je_mallopt(int param, int value) { | ||
107 | 107 | // clear the caches of other threads. |
108 | 108 | // This must be done first so that cleared allocations get purged |
109 | 109 | // in the next calls. |
110 | - if (je_mallctl("thread.tcache.flush", nullptr, nullptr, nullptr, 0) != 0) { | |
111 | - return 0; | |
112 | - } | |
110 | + // Ignore the return call since this will fail if the tcache is disabled. | |
111 | + je_mallctl("thread.tcache.flush", nullptr, nullptr, nullptr, 0); | |
113 | 112 | |
114 | 113 | unsigned narenas; |
115 | 114 | size_t sz = sizeof(unsigned); |