Skip to content
Commit 255913b3 authored by Kostya Kortchinsky's avatar Kostya Kortchinsky
Browse files

[scudo] Limit by default the TSD pool to 2 on Android

Summary:
jemalloc on Android currently uses 2 arenas
(https://android.googlesource.com/platform/external/jemalloc/+/master/Android.bp#64).
Since the Android toolchain absorbs compiler-rt and compiles it as is, we have
to enforce the same limit to somehow stay competitive in terms of memory usage.

The changes could either go in:
- `scudo_platform.h` with a default for Android of 2 (this is the solution
  implemented here);
- in `CMakeLists.txt` adding -DSCUDO_SHARED_TSD_POOL_SIZE=2 for Android.
- something else?

I don't have a strong opinion on how to do it, but it has to be done upstream
anyway.

Reviewers: alekseyshl, eugenis

Reviewed By: alekseyshl, eugenis

Subscribers: srhines, #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D42194

llvm-svn: 322764
parent fe8e00bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment