diff options
Diffstat (limited to 'deps/v8/src/base/platform/platform-win32.cc')
-rw-r--r-- | deps/v8/src/base/platform/platform-win32.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/deps/v8/src/base/platform/platform-win32.cc b/deps/v8/src/base/platform/platform-win32.cc index 2e56ac5df1..11a008e6c6 100644 --- a/deps/v8/src/base/platform/platform-win32.cc +++ b/deps/v8/src/base/platform/platform-win32.cc @@ -822,7 +822,8 @@ void* OS::Allocate(void* address, size_t size, size_t alignment, if (base == nullptr) return nullptr; // Can't allocate, we're OOM. // If address is suitably aligned, we're done. - uint8_t* aligned_base = RoundUp(base, alignment); + uint8_t* aligned_base = reinterpret_cast<uint8_t*>( + RoundUp(reinterpret_cast<uintptr_t>(base), alignment)); if (base == aligned_base) return reinterpret_cast<void*>(base); // Otherwise, free it and try a larger allocation. @@ -843,7 +844,8 @@ void* OS::Allocate(void* address, size_t size, size_t alignment, // Try to trim the allocation by freeing the padded allocation and then // calling VirtualAlloc at the aligned base. CHECK(Free(base, padded_size)); - aligned_base = RoundUp(base, alignment); + aligned_base = reinterpret_cast<uint8_t*>( + RoundUp(reinterpret_cast<uintptr_t>(base), alignment)); base = reinterpret_cast<uint8_t*>( VirtualAlloc(aligned_base, size, flags, protect)); // We might not get the reduced allocation due to a race. In that case, |