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

Unified Diff: third_party/tcmalloc/chromium/src/malloc_extension.cc

Issue 576001: Merged third_party/tcmalloc/vendor/src(google-perftools r87) into... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removed the unnecessary printf and ASSERT(0) Created 10 years, 9 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: third_party/tcmalloc/chromium/src/malloc_extension.cc
===================================================================
--- third_party/tcmalloc/chromium/src/malloc_extension.cc (revision 41942)
+++ third_party/tcmalloc/chromium/src/malloc_extension.cc (working copy)
@@ -143,10 +143,14 @@
// Default implementation does nothing
}
-void MallocExtension::ReleaseFreeMemory() {
+void MallocExtension::ReleaseToSystem(size_t num_bytes) {
// Default implementation does nothing
}
+void MallocExtension::ReleaseFreeMemory() {
+ ReleaseToSystem(static_cast<size_t>(-1)); // SIZE_T_MAX
+}
+
void MallocExtension::SetMemoryReleaseRate(double rate) {
// Default implementation does nothing
}
@@ -300,6 +304,10 @@
DumpAddressMap(writer);
}
+void MallocExtension::Ranges(void* arg, RangeFunction func) {
+ // No callbacks by default
+}
+
// These are C shims that work on the current instance.
#define C_SHIM(fn, retval, paramlist, arglist) \
@@ -325,5 +333,6 @@
C_SHIM(MarkThreadIdle, void, (void), ());
C_SHIM(MarkThreadBusy, void, (void), ());
C_SHIM(ReleaseFreeMemory, void, (void), ());
+C_SHIM(ReleaseToSystem, void, (size_t num_bytes), (num_bytes));
C_SHIM(GetEstimatedAllocatedSize, size_t, (size_t size), (size));
C_SHIM(GetAllocatedSize, size_t, (void* p), (p));
« no previous file with comments | « third_party/tcmalloc/chromium/src/heap-profile-table.cc ('k') | third_party/tcmalloc/chromium/src/malloc_hook.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698