Index: src/platform-openbsd.cc |
diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc |
index b09d588a3fcd23eda3a298304b82454685ee3b6b..c29ebde033d82685ba48e7b82fa033f43f39bd43 100644 |
--- a/src/platform-openbsd.cc |
+++ b/src/platform-openbsd.cc |
@@ -23,11 +23,12 @@ |
#include <sys/types.h> // mmap & munmap |
#include <unistd.h> // sysconf |
-#undef MAP_TYPE |
+#include <cmath> |
-#include "src/v8.h" |
+#undef MAP_TYPE |
#include "src/platform.h" |
+#include "src/utils.h" |
namespace v8 { |
@@ -184,9 +185,9 @@ void OS::SignalCodeMovingGC() { |
// by the kernel and allows us to synchronize V8 code log and the |
// kernel log. |
int size = sysconf(_SC_PAGESIZE); |
- FILE* f = fopen(FLAG_gc_fake_mmap, "w+"); |
+ FILE* f = fopen(OS::GetGCFakeMMapFile(), "w+"); |
if (f == NULL) { |
- OS::PrintError("Failed to open %s\n", FLAG_gc_fake_mmap); |
+ OS::PrintError("Failed to open %s\n", OS::GetGCFakeMMapFile()); |
OS::Abort(); |
} |
void* addr = mmap(NULL, size, PROT_READ | PROT_EXEC, MAP_PRIVATE, |
@@ -223,8 +224,8 @@ VirtualMemory::VirtualMemory(size_t size, size_t alignment) |
kMmapFdOffset); |
if (reservation == MAP_FAILED) return; |
- Address base = static_cast<Address>(reservation); |
- Address aligned_base = RoundUp(base, alignment); |
+ uint8_t* base = static_cast<uint8_t*>(reservation); |
+ uint8_t* aligned_base = RoundUp(base, alignment); |
ASSERT_LE(base, aligned_base); |
// Unmap extra memory reserved before and after the desired block. |