Index: base/memory/discardable_shared_memory.h |
diff --git a/base/memory/discardable_shared_memory.h b/base/memory/discardable_shared_memory.h |
index e3b437c89e7e4bb743db4dc1c7d82ed411a1cb40..230f3875397f130895af7f2f4371a09350b06340 100644 |
--- a/base/memory/discardable_shared_memory.h |
+++ b/base/memory/discardable_shared_memory.h |
@@ -93,12 +93,6 @@ class BASE_EXPORT DiscardableSharedMemory { |
// each call. |
bool Purge(Time current_time); |
- // Purge and release as much memory as possible to the OS. |
- // Note: The amount of memory that can be released to the OS is platform |
- // specific. Best case, all but one page is released. Worst case, nothing |
- // is released. |
- bool PurgeAndTruncate(Time current_time); |
- |
// Returns true if memory is still resident. |
bool IsMemoryResident() const; |
@@ -116,6 +110,12 @@ class BASE_EXPORT DiscardableSharedMemory { |
return shared_memory_.ShareToProcess(process_handle, new_handle); |
} |
+#if defined(OS_POSIX) && !defined(OS_ANDROID) |
+ // Release as much memory as possible to the OS. The change in size will |
+ // be reflected by the return value of mapped_size(). |
+ void Shrink(); |
+#endif |
+ |
private: |
// Virtual for tests. |
virtual Time Now() const; |