Moving around some math macros.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <mutex>
|
||||
|
||||
#include <gflags/gflags.h>
|
||||
#include <poly/math.h>
|
||||
|
||||
using namespace alloy;
|
||||
using namespace xe::cpu;
|
||||
@@ -510,7 +511,7 @@ uint64_t XenonMemoryHeap::Alloc(
|
||||
size_t heap_guard_size = FLAGS_heap_guard_pages * 4096;
|
||||
if (heap_guard_size) {
|
||||
alignment = std::max(alignment, static_cast<uint32_t>(heap_guard_size));
|
||||
alloc_size = (uint32_t)XEROUNDUP(size, heap_guard_size);
|
||||
alloc_size = static_cast<uint32_t>(poly::round_up(size, heap_guard_size));
|
||||
}
|
||||
uint8_t* p = (uint8_t*)mspace_memalign(space_, alignment,
|
||||
alloc_size + heap_guard_size * 2);
|
||||
|
||||
Reference in New Issue
Block a user