From 660188264dee3c8f3510e2e24c11816c6b60f197 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 5 May 2014 20:47:19 -0700 Subject: ART: Use utils.h::RoundUp instead of explicit bit-fiddling Change-Id: I249a2cfeb044d3699d02e13d42b8e72518571640 --- compiler/utils/arena_allocator.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/utils/arena_allocator.h') 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); -- cgit v1.2.3-59-g8ed1b