summaryrefslogtreecommitdiffstats
path: root/content/child/child_discardable_shared_memory_manager.h
diff options
context:
space:
mode:
authorreveman <reveman@chromium.org>2015-03-16 19:31:30 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-17 02:32:11 +0000
commit1500e1a7a2445bb9bddc9e492db6c988dfbc815f (patch)
treeb8bcdfedc0cf297c649aa8e3de2561c2dcf15452 /content/child/child_discardable_shared_memory_manager.h
parent159f0e04e089a3a12c9ffc44ea644a3abbc4a7ae (diff)
downloadchromium_src-1500e1a7a2445bb9bddc9e492db6c988dfbc815f.zip
chromium_src-1500e1a7a2445bb9bddc9e492db6c988dfbc815f.tar.gz
chromium_src-1500e1a7a2445bb9bddc9e492db6c988dfbc815f.tar.bz2
content: Add DeletedDiscardableSharedMemory IPC.
This provides a mechanism for child processes to notify the browser process that a discardable memory segment has been deleted. This reduces the chance of the browser unnecessarily purging a memory segment that is still useful and it makes total discardable memory usage stats in the browser process better match current usage by all child processes. BUG= TEST=content_unittests --gtest_filter=DiscardableSharedMemoryHeapTest.DeletedCallback, content_browsertests --gtest_filter=ChildDiscardableSharedMemoryManagerBrowserTest.ReleaseFreeMemory Review URL: https://codereview.chromium.org/1009203004 Cr-Commit-Position: refs/heads/master@{#320848}
Diffstat (limited to 'content/child/child_discardable_shared_memory_manager.h')
-rw-r--r--content/child/child_discardable_shared_memory_manager.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/content/child/child_discardable_shared_memory_manager.h b/content/child/child_discardable_shared_memory_manager.h
index 27c8b83..cc534e4 100644
--- a/content/child/child_discardable_shared_memory_manager.h
+++ b/content/child/child_discardable_shared_memory_manager.h
@@ -11,6 +11,7 @@
#include "content/child/thread_safe_sender.h"
#include "content/common/content_export.h"
#include "content/common/discardable_shared_memory_heap.h"
+#include "content/common/host_discardable_shared_memory_manager.h"
namespace content {
@@ -35,7 +36,8 @@ class CONTENT_EXPORT ChildDiscardableSharedMemoryManager
private:
scoped_ptr<base::DiscardableSharedMemory>
- AllocateLockedDiscardableSharedMemory(size_t size);
+ AllocateLockedDiscardableSharedMemory(size_t size,
+ DiscardableSharedMemoryId id);
void MemoryUsageChanged(size_t new_bytes_allocated,
size_t new_bytes_free) const;