summaryrefslogtreecommitdiff
path: root/compiler/utils/arena_allocator.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-05-06 21:39:56 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-05-06 21:39:56 +0000
commit1f1d2513a11eaaa59601d7599ac2e80ddfa1bcf5 (patch)
tree6c79b4c5babe26d3ae83c06ae3b7119293315359 /compiler/utils/arena_allocator.h
parent9780f97d4864f33150407707e6ca09a8a7a20914 (diff)
parent660188264dee3c8f3510e2e24c11816c6b60f197 (diff)
Merge "ART: Use utils.h::RoundUp instead of explicit bit-fiddling"
Diffstat (limited to 'compiler/utils/arena_allocator.h')
-rw-r--r--compiler/utils/arena_allocator.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/utils/arena_allocator.h b/compiler/utils/arena_allocator.h
index 18a5bce77d..032eabc7df 100644
--- a/compiler/utils/arena_allocator.h
+++ b/compiler/utils/arena_allocator.h
@@ -23,6 +23,7 @@
#include "base/macros.h"
#include "base/mutex.h"
#include "mem_map.h"
+#include "utils.h"
namespace art {
@@ -155,7 +156,7 @@ class ArenaAllocator : private ArenaAllocatorStats {
if (UNLIKELY(running_on_valgrind_)) {
return AllocValgrind(bytes, kind);
}
- bytes = (bytes + 3) & ~3;
+ bytes = RoundUp(bytes, 4);
if (UNLIKELY(ptr_ + bytes > end_)) {
// Obtain a new block.
ObtainNewArenaForAllocation(bytes);