Commit ac2bc4e0 authored by Dmitry Vyukov's avatar Dmitry Vyukov
Browse files

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
parent 7779f49b
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -96,9 +96,6 @@ extern "C" void _exit(int status);
extern "C" int fileno_unlocked(void *stream);
extern "C" int dirfd(void *dirp);
#endif
#if SANITIZER_GLIBC
extern "C" int mallopt(int param, int value);
#endif
#if SANITIZER_NETBSD
extern __sanitizer_FILE __sF[];
#else
@@ -2668,12 +2665,6 @@ void InitializeInterceptors() {
  REAL(memcpy) = internal_memcpy;
#endif

  // Instruct libc malloc to consume less memory.
#if SANITIZER_GLIBC
  mallopt(1, 0);  // M_MXFAST
  mallopt(-3, 32*1024);  // M_MMAP_THRESHOLD
#endif

  new(interceptor_ctx()) InterceptorContext();

  InitializeCommonInterceptors();