Index: content/app/content_main_runner.cc |
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
index f59f1774e4136e1843855410e782bc3c6c62752d..b64c498ec5818b170fdbcfdb6bea64cd53601cab 100644 |
--- a/content/app/content_main_runner.cc |
+++ b/content/app/content_main_runner.cc |
@@ -54,6 +54,7 @@ |
#if defined(USE_TCMALLOC) |
#include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h" |
+#include "third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h" |
#if defined(TYPE_PROFILING) |
#include "base/allocator/type_profiler.h" |
#include "base/allocator/type_profiler_tcmalloc.h" |
@@ -95,12 +96,6 @@ |
#endif // OS_POSIX |
-#if !defined(OS_MACOSX) && defined(USE_TCMALLOC) |
willchan no longer on Chromium
2014/01/16 01:30:05
Thanks for the cleanup.
|
-extern "C" { |
-int tc_set_new_mode(int mode); |
-} |
-#endif |
- |
namespace content { |
extern int GpuMain(const content::MainFunctionParams&); |
#if defined(ENABLE_PLUGINS) |
@@ -572,6 +567,8 @@ class ContentMainRunnerImpl : public ContentMainRunner { |
// For tcmalloc, we need to tell it to behave like new. |
tc_set_new_mode(1); |
+ base::SetTCMallocSkipNewHandlerFunction(&tc_malloc_skip_new_handler); |
+ |
// On windows, we've already set these thunks up in _heap_init() |
base::allocator::SetGetAllocatorWasteSizeFunction( |
GetAllocatorWasteSizeThunk); |