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

Unified Diff: base/memory/discardable_shared_memory.h

Issue 1409743002: Re-land: base: Use MADV_REMOVE instead of ftruncate to purge discardable memory segments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | base/memory/discardable_shared_memory.cc » ('j') | base/memory/discardable_shared_memory.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..562295ce7e8c0e798317de4e8f61fa12ae576ef4 100644
--- a/base/memory/discardable_shared_memory.h
+++ b/base/memory/discardable_shared_memory.h
@@ -15,12 +15,6 @@
#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
-#endif
-
namespace base {
// Platform abstraction for discardable shared memory.
@@ -124,12 +118,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;
« no previous file with comments | « no previous file | base/memory/discardable_shared_memory.cc » ('j') | base/memory/discardable_shared_memory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698