Index: src/platform-posix.cc |
=================================================================== |
--- src/platform-posix.cc (revision 8772) |
+++ src/platform-posix.cc (working copy) |
@@ -70,6 +70,12 @@ |
} |
+// Get rid of writable permission on code allocations. |
+void OS::ProtectCode(void* address, const size_t size) { |
+ mprotect(address, size, PROT_READ | PROT_EXEC); |
+} |
+ |
+ |
// Create guard pages. |
void OS::Guard(void* address, const size_t size) { |
mprotect(address, size, PROT_NONE); |