aboutsummaryrefslogtreecommitdiff
path: root/util/arena.cc
diff options
context:
space:
mode:
Diffstat (limited to 'util/arena.cc')
-rw-r--r--util/arena.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/arena.cc b/util/arena.cc
index 9551d6a..9367f71 100644
--- a/util/arena.cc
+++ b/util/arena.cc
@@ -40,7 +40,7 @@ char* Arena::AllocateFallback(size_t bytes) {
}
char* Arena::AllocateAligned(size_t bytes) {
- const int align = sizeof(void*); // We'll align to pointer size
+ const int align = (sizeof(void*) > 8) ? sizeof(void*) : 8;
assert((align & (align-1)) == 0); // Pointer size should be a power of 2
size_t current_mod = reinterpret_cast<uintptr_t>(alloc_ptr_) & (align-1);
size_t slop = (current_mod == 0 ? 0 : align - current_mod);