Skip to content

Commit ac2bc4e

Browse files
committed
tsan: remove mallopt calls
mallopt calls are left-over from the times we used __libc_malloc/__libc_free for internal allocations. Now we have own internal allocator, so this is not needed. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D107342
1 parent 7779f49 commit ac2bc4e

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ extern "C" void _exit(int status);
9696
extern "C" int fileno_unlocked(void *stream);
9797
extern "C" int dirfd(void *dirp);
9898
#endif
99-
#if SANITIZER_GLIBC
100-
extern "C" int mallopt(int param, int value);
101-
#endif
10299
#if SANITIZER_NETBSD
103100
extern __sanitizer_FILE __sF[];
104101
#else
@@ -2668,12 +2665,6 @@ void InitializeInterceptors() {
26682665
REAL(memcpy) = internal_memcpy;
26692666
#endif
26702667

2671-
// Instruct libc malloc to consume less memory.
2672-
#if SANITIZER_GLIBC
2673-
mallopt(1, 0); // M_MXFAST
2674-
mallopt(-3, 32*1024); // M_MMAP_THRESHOLD
2675-
#endif
2676-
26772668
new(interceptor_ctx()) InterceptorContext();
26782669

26792670
InitializeCommonInterceptors();

0 commit comments

Comments
 (0)