| 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));
|
|
|