summaryrefslogtreecommitdiffstats
path: root/runtime/gc/allocator/rosalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/gc/allocator/rosalloc.h')
-rw-r--r--runtime/gc/allocator/rosalloc.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/runtime/gc/allocator/rosalloc.h b/runtime/gc/allocator/rosalloc.h
index a439188..13f61ec 100644
--- a/runtime/gc/allocator/rosalloc.h
+++ b/runtime/gc/allocator/rosalloc.h
@@ -45,10 +45,7 @@ class RosAlloc {
byte magic_num_; // The magic number used for debugging only.
bool IsFree() const {
- if (kIsDebugBuild) {
- return magic_num_ == kMagicNumFree;
- }
- return true;
+ return !kIsDebugBuild || magic_num_ == kMagicNumFree;
}
size_t ByteSize(RosAlloc* rosalloc) const EXCLUSIVE_LOCKS_REQUIRED(rosalloc->lock_) {
const byte* fpr_base = reinterpret_cast<const byte*>(this);