Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 10239012: Route calls to tcmalloc MallocExtension through allocator agnostic interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix base_nacl_win64 Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/chrome_render_process_observer.cc
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc
index 4dffed0d7eca5cadd36467a34d7075ece5a5286f..b1bf0086841617e8f175580d162e292d690e2dfa 100644
--- a/chrome/renderer/chrome_render_process_observer.cc
+++ b/chrome/renderer/chrome_render_process_observer.cc
@@ -4,6 +4,7 @@
#include "chrome/renderer/chrome_render_process_observer.h"
+#include "base/allocator/allocator_extension.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -35,7 +36,6 @@
#include "net/base/net_module.h"
#include "third_party/sqlite/sqlite3.h"
#include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
-#include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCrossOriginPreflightResultCache.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
@@ -329,10 +329,8 @@ void ChromeRenderProcessObserver::OnPurgeMemory() {
v8::V8::LowMemoryNotification();
-#if !defined(OS_MACOSX) && defined(USE_TCMALLOC)
- // Tell tcmalloc to release any free pages it's still holding.
- MallocExtension::instance()->ReleaseFreeMemory();
-#endif
+ // Tell our allocator to release any free pages it's still holding.
+ base::allocator::ReleaseFreeMemory();
if (client_)
client_->OnPurgeMemory();

Powered by Google App Engine
This is Rietveld 408576698