Index: src/platform-posix.cc |
=================================================================== |
--- src/platform-posix.cc (revision 8679) |
+++ src/platform-posix.cc (working copy) |
@@ -33,6 +33,7 @@ |
#include <errno.h> |
#include <time.h> |
+#include <sys/mman.h> |
#include <sys/socket.h> |
#include <sys/resource.h> |
#include <sys/time.h> |
@@ -43,6 +44,8 @@ |
#include <netinet/in.h> |
#include <netdb.h> |
+#undef MAP_TYPE |
+ |
#if defined(ANDROID) |
#define LOG_TAG "v8" |
#include <utils/Log.h> // LOG_PRI_VA |
@@ -67,6 +70,12 @@ |
} |
+// Create guard pages. |
+void OS::Guard(void* address, const size_t size) { |
+ mprotect(address, size, PROT_NONE); |
+} |
+ |
+ |
// ---------------------------------------------------------------------------- |
// Math functions |