Index: src/platform-linux.cc |
diff --git a/src/platform-linux.cc b/src/platform-linux.cc |
index f92f2f9a9fcf441dff8f2dbe9e9d8dc26776a7d8..9d7c8cd14137a92dbe15fda5827897fb691cab90 100644 |
--- a/src/platform-linux.cc |
+++ b/src/platform-linux.cc |
@@ -39,11 +39,12 @@ |
#include <sanitizer/lsan_interface.h> |
#endif |
-#undef MAP_TYPE |
+#include <cmath> |
-#include "src/v8.h" |
+#undef MAP_TYPE |
#include "src/platform.h" |
+#include "src/utils.h" |
namespace v8 { |
@@ -254,9 +255,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(OS::GetRandomMmapAddr(), |
@@ -302,8 +303,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. |