diff options
Diffstat (limited to 'deps/v8/src/base/platform/platform.h')
-rw-r--r-- | deps/v8/src/base/platform/platform.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/deps/v8/src/base/platform/platform.h b/deps/v8/src/base/platform/platform.h index 5d570e7048..374cddfc0c 100644 --- a/deps/v8/src/base/platform/platform.h +++ b/deps/v8/src/base/platform/platform.h @@ -178,6 +178,11 @@ class V8_BASE_EXPORT OS { bool is_executable); static void Free(void* address, const size_t size); + // Allocates a region of memory that is inaccessible. On Windows this reserves + // but does not commit the memory. On Linux, it is equivalent to a call to + // Allocate() followed by Guard(). + static void* AllocateGuarded(const size_t requested); + // This is the granularity at which the ProtectCode(...) call can set page // permissions. static intptr_t CommitPageSize(); @@ -188,6 +193,9 @@ class V8_BASE_EXPORT OS { // Assign memory as a guard page so that access will cause an exception. static void Guard(void* address, const size_t size); + // Make a region of memory readable and writable. + static void Unprotect(void* address, const size_t size); + // Generate a random address to be used for hinting mmap(). static void* GetRandomMmapAddr(); |