From 625dae442419d3f75bcecbafeaca490cdd5413a8 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 21 Oct 2014 16:47:53 +0200 Subject: Allow page allocations to include guard pages The PageAllocator is in principle capable of using guard pages. We can expose that functionality to its clients. Change-Id: I919f6f76310feb160d2b26ac1fc64db4e91804bb Reviewed-by: Simon Hausmann --- src/3rdparty/masm/wtf/PageBlock.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/3rdparty/masm/wtf/PageBlock.h') diff --git a/src/3rdparty/masm/wtf/PageBlock.h b/src/3rdparty/masm/wtf/PageBlock.h index 56e5570178..4d408e1c91 100644 --- a/src/3rdparty/masm/wtf/PageBlock.h +++ b/src/3rdparty/masm/wtf/PageBlock.h @@ -40,8 +40,13 @@ public: PageBlock(const PageBlock&); PageBlock(void*, size_t, bool hasGuardPages); + void* realBase() const { return m_realBase; } void* base() const { return m_base; } - size_t size() const { return m_size; } + size_t size() const + { + return m_size - 2 * (static_cast(m_base) - static_cast(m_realBase)); + } + size_t realSize() const { return m_size; } operator bool() const { return !!m_realBase; } -- cgit v1.2.3