| Index: content/app/content_main_runner.cc
|
| diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
|
| index 4d76ab1f5170d86e479d12bfb8e9bd007a88ab05..efc773a680554557e6168bf7da3930fc4883afe6 100644
|
| --- a/content/app/content_main_runner.cc
|
| +++ b/content/app/content_main_runner.cc
|
| @@ -48,6 +48,9 @@
|
|
|
| #if defined(USE_TCMALLOC)
|
| #include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h"
|
| +#if defined(PROFILING_ALLOCATED_TYPE)
|
| +#include "base/allocator/allocated_type_profiler_tcmalloc.h"
|
| +#endif
|
| #endif
|
|
|
| #if defined(OS_WIN)
|
| @@ -447,6 +450,13 @@ static void ReleaseFreeMemoryThunk() {
|
| // implement this EnableTerminationOnOutOfMemory() function. Whateverz.
|
| // This works for now.
|
| #if !defined(OS_MACOSX) && defined(USE_TCMALLOC)
|
| +
|
| +#if defined(PROFILING_ALLOCATED_TYPE)
|
| + base::allocated_type_profiler::SetInterceptFunctions(
|
| + base::allocated_type_profiler::NewInterceptForTCMalloc,
|
| + base::allocated_type_profiler::DeleteInterceptForTCMalloc);
|
| +#endif
|
| +
|
| // For tcmalloc, we need to tell it to behave like new.
|
| tc_set_new_mode(1);
|
|
|
|
|