aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/wtf/PageBlock.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-10-21 16:47:53 +0200
committerUlf Hermann <ulf.hermann@digia.com>2014-10-30 13:19:33 +0100
commit625dae442419d3f75bcecbafeaca490cdd5413a8 (patch)
tree260ef75b180794ba4d4f8ed5ec4f18221604834e /src/3rdparty/masm/wtf/PageBlock.h
parent970ff81a14c93c4f41f384026220d4baad8eec70 (diff)
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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/3rdparty/masm/wtf/PageBlock.h')
-rw-r--r--src/3rdparty/masm/wtf/PageBlock.h7
1 files changed, 6 insertions, 1 deletions
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<char *>(m_base) - static_cast<char *>(m_realBase));
+ }
+ size_t realSize() const { return m_size; }
operator bool() const { return !!m_realBase; }