Index: base/process_util_linux.cc |
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc |
index 25f1c2708e65a2c9b3065cbb22f347eea4fee95a..12ffe302a1980d37e940bb317dce9f189c6633bb 100644 |
--- a/base/process_util_linux.cc |
+++ b/base/process_util_linux.cc |
@@ -514,11 +514,7 @@ void OnNoMemory() { |
extern "C" { |
-#if defined(LINUX_USE_TCMALLOC) |
- |
-int tc_set_new_mode(int mode); |
- |
-#else // defined(LINUX_USE_TCMALLOC) |
+#if !defined(LINUX_USE_TCMALLOC) |
typedef void* (*malloc_type)(size_t size); |
typedef void* (*valloc_type)(size_t size); |
@@ -584,7 +580,7 @@ DIE_ON_OOM_2(memalign, size_t) |
DIE_ON_OOM_3INT(posix_memalign) |
-#endif // defined(LINUX_USE_TCMALLOC) |
+#endif // !defined(LINUX_USE_TCMALLOC) |
} // extern C |
@@ -593,10 +589,6 @@ void EnableTerminationOnOutOfMemory() { |
std::set_new_handler(&OnNoMemory); |
// If we're using glibc's allocator, the above functions will override |
// malloc and friends and make them die on out of memory. |
-#if defined(LINUX_USE_TCMALLOC) |
- // For tcmalloc, we just need to tell it to behave like new. |
- tc_set_new_mode(1); |
-#endif |
} |
} // namespace base |