Index: base/memory/discardable_shared_memory.h |
diff --git a/base/memory/discardable_shared_memory.h b/base/memory/discardable_shared_memory.h |
index 5dca884ca82e2d6665930905c92e990b8a5515c2..ff93ee7d7c1b50bdcb7dd1e1026a80a121704a14 100644 |
--- a/base/memory/discardable_shared_memory.h |
+++ b/base/memory/discardable_shared_memory.h |
@@ -15,10 +15,11 @@ |
#include <set> |
#endif |
-// Define DISCARDABLE_SHARED_MEMORY_SHRINKING if platform supports shrinking |
-// of discardable shared memory segments. |
-#if defined(OS_POSIX) && !defined(OS_ANDROID) |
-#define DISCARDABLE_SHARED_MEMORY_SHRINKING |
+// Define DISCARDABLE_SHARED_MEMORY_REMOVE if platform supports MADV_REMOVE |
+// and can remove resources associated with discardable shared memory when |
+// purging a segment. |
+#if defined(OS_LINUX) || defined(OS_ANDROID) |
+#define DISCARDABLE_SHARED_MEMORY_REMOVE |
#endif |
namespace base { |
@@ -124,12 +125,6 @@ class BASE_EXPORT DiscardableSharedMemory { |
return shared_memory_.ShareToProcess(process_handle, new_handle); |
} |
-#if defined(DISCARDABLE_SHARED_MEMORY_SHRINKING) |
- // 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; |