Chromium Code Reviews| 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..8bb941a8e677581abab593b9835e23fdfa44750f 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,14 @@ 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::SetNewInterceptFunction( |
|
jar (doing other things)
2012/08/23 19:55:25
nit: Do you ever set these separately? IF you alwa
Dai Mikurube (NOT FULLTIME)
2012/08/24 02:47:27
Done. I kept individual functions since I often u
jar (doing other things)
2012/08/27 17:17:12
It was not clear which of these should be set firs
Dai Mikurube (NOT FULLTIME)
2012/08/27 23:52:56
Ok, I'll remove individual functions. When I need
Dai Mikurube (NOT FULLTIME)
2012/08/28 09:04:57
Done.
|
| + base::allocated_type::NewInterceptForTCMalloc); |
| + base::allocated_type::SetDeleteInterceptFunction( |
| + base::allocated_type::DeleteInterceptForTCMalloc); |
| +#endif |
| + |
| // For tcmalloc, we need to tell it to behave like new. |
| tc_set_new_mode(1); |