aboutsummaryrefslogtreecommitdiff
path: root/include/perfetto/ext/base/paged_memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/perfetto/ext/base/paged_memory.h')
-rw-r--r--include/perfetto/ext/base/paged_memory.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/perfetto/ext/base/paged_memory.h b/include/perfetto/ext/base/paged_memory.h
index 0afd6b887..f0ed568c4 100644
--- a/include/perfetto/ext/base/paged_memory.h
+++ b/include/perfetto/ext/base/paged_memory.h
@@ -56,8 +56,9 @@ class PagedMemory {
};
// Allocates |size| bytes using mmap(MAP_ANONYMOUS). The returned memory is
- // guaranteed to be page-aligned and guaranteed to be zeroed.
- // For |flags|, see the AllocationFlags enum above.
+ // guaranteed to be page-aligned and guaranteed to be zeroed. |size| must be a
+ // multiple of 4KB (a page size). For |flags|, see the AllocationFlags enum
+ // above.
static PagedMemory Allocate(size_t size, int flags = 0);
// Hint to the OS that the memory range is not needed and can be discarded.
@@ -87,10 +88,6 @@ class PagedMemory {
PagedMemory& operator=(const PagedMemory&) = default;
char* p_ = nullptr;
-
- // The size originally passed to Allocate(). The actual virtual memory
- // reservation will be larger due to: (i) guard pages; (ii) rounding up to
- // the system page size.
size_t size_ = 0;
#if TRACK_COMMITTED_SIZE()