Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index dc7a040226fe11fed71fa73a05b993e73a2b3f97..18b73eb421090723684846d0df2bf7750b92ecf8 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -9,6 +9,7 @@ |
#include <map> |
#include <vector> |
+#include "base/allocator/allocator_extension.h" |
#include "base/command_line.h" |
#include "base/debug/trace_event.h" |
#include "base/lazy_instance.h" |
@@ -64,7 +65,6 @@ |
#include "media/base/media.h" |
#include "net/base/net_errors.h" |
#include "net/base/net_util.h" |
-#include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebColorName.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" |
@@ -638,9 +638,8 @@ void RenderThreadImpl::IdleHandler() { |
IdleHandlerInForegroundTab(); |
return; |
} |
-#if !defined(OS_MACOSX) && defined(USE_TCMALLOC) |
- MallocExtension::instance()->ReleaseFreeMemory(); |
-#endif |
+ |
+ base::allocator::ReleaseFreeMemory(); |
v8::V8::IdleNotification(); |
@@ -678,9 +677,7 @@ void RenderThreadImpl::IdleHandlerInForegroundTab() { |
// idle pause. We set it proportional to the idle timer delay. |
int idle_hint = static_cast<int>(new_delay_ms / 10); |
if (cpu_usage < kIdleCPUUsageThresholdInPercents) { |
-#if !defined(OS_MACOSX) && defined(USE_TCMALLOC) |
- MallocExtension::instance()->ReleaseFreeMemory(); |
-#endif |
+ base::allocator::ReleaseFreeMemory(); |
if (v8::V8::IdleNotification(idle_hint)) { |
// V8 finished collecting garbage. |
new_delay_ms = kLongIdleHandlerDelayMs; |