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

Unified Diff: base/memory/discardable_shared_memory.h

Issue 1374213002: [tracing] Display the locked size of discardable memory segment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
Index: base/memory/discardable_shared_memory.h
diff --git a/base/memory/discardable_shared_memory.h b/base/memory/discardable_shared_memory.h
index 74bbe8e95f427ba347d696e6c6e9c408e166e167..edfe54e29c2f1188db93772ec974f3f32a9f562c 100644
--- a/base/memory/discardable_shared_memory.h
+++ b/base/memory/discardable_shared_memory.h
@@ -56,6 +56,11 @@ class BASE_EXPORT DiscardableSharedMemory {
// The actual size of the mapped memory (may be larger than requested).
size_t mapped_size() const { return mapped_size_; }
+ // The total size of locked segments by this instance of
+ // DiscardableSharedMemory. If the memory is shared with other process,
+ // then returns the total size of the segment if locked.
+ size_t LockedSize() const;
reveman 2015/09/29 12:29:10 I assume you're interested in being able to call t
ssid 2015/09/29 16:03:55 Maybe I should just rename it? instead of calculat
+
// Returns a shared memory handle for this DiscardableSharedMemory object.
SharedMemoryHandle handle() const { return shared_memory_.handle(); }
« no previous file with comments | « no previous file | base/memory/discardable_shared_memory.cc » ('j') | content/common/discardable_shared_memory_heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698