Moving around some math macros.

This commit is contained in:
Ben Vanik
2014-08-16 17:18:20 -07:00
parent 54ce9db743
commit 5b83cf5fd1
23 changed files with 148 additions and 137 deletions

View File

@@ -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);