Skip to content

Commit c3a9242

Browse files
author
Daniel Martinez
committed
Remove mallopt to fix build on musl
Other sanitizers don't use mallopt, musl doesn't provide mallopt, and tcmalloc ignores mallopt. Its easiest jut to remove it
1 parent 708a9a0 commit c3a9242

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

compiler-rt/lib/nsan/nsan_interceptors.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121

2222
#include <wchar.h>
2323

24-
#if SANITIZER_LINUX
25-
extern "C" int mallopt(int param, int value);
26-
#endif
27-
2824
using namespace __sanitizer;
2925
using __nsan::nsan_init_is_running;
3026
using __nsan::nsan_initialized;
@@ -209,12 +205,6 @@ void __nsan::InitializeInterceptors() {
209205
static bool initialized = false;
210206
CHECK(!initialized);
211207

212-
// Instruct libc malloc to consume less memory.
213-
#if SANITIZER_LINUX
214-
mallopt(1, 0); // M_MXFAST
215-
mallopt(-3, 32 * 1024); // M_MMAP_THRESHOLD
216-
#endif
217-
218208
InitializeMallocInterceptors();
219209

220210
INTERCEPT_FUNCTION(memset);

0 commit comments

Comments
 (0)