aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2019-07-09 11:38:34 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-07-09 11:38:34 -0700
commit358c8c95725380eafe9f2aed0a4e2542592e85ff (patch)
tree8d5b09118c1f98d50d1a0cd4329f4ceb922f9513
parentd13cb58b3afda031fbe38f6dc8eaca28237c8a3b (diff)
parent5cda74e065761bbeccf7ff61d7a3131bdf6490d0 (diff)
downloadandroid_bionic-358c8c95725380eafe9f2aed0a4e2542592e85ff.tar.gz
android_bionic-358c8c95725380eafe9f2aed0a4e2542592e85ff.tar.bz2
android_bionic-358c8c95725380eafe9f2aed0a4e2542592e85ff.zip
Do not check tcache clear when doing a purge.
am: 5cda74e065 Change-Id: I6fdf747408e96c1f99c4544e94a97835c8588d19
-rw-r--r--libc/bionic/jemalloc_wrapper.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libc/bionic/jemalloc_wrapper.cpp b/libc/bionic/jemalloc_wrapper.cpp
index bf0494dde..7d0445784 100644
--- a/libc/bionic/jemalloc_wrapper.cpp
+++ b/libc/bionic/jemalloc_wrapper.cpp
@@ -107,9 +107,8 @@ int je_mallopt(int param, int value) {
// clear the caches of other threads.
// This must be done first so that cleared allocations get purged
// in the next calls.
- if (je_mallctl("thread.tcache.flush", nullptr, nullptr, nullptr, 0) != 0) {
- return 0;
- }
+ // Ignore the return call since this will fail if the tcache is disabled.
+ je_mallctl("thread.tcache.flush", nullptr, nullptr, nullptr, 0);
unsigned narenas;
size_t sz = sizeof(unsigned);