Fix memory leak caused by not adding lage objects to allocation stack.
Large objects weren't being added to allocation stack. This was
causing them to never be marked as live and therefore never freed.
Change-Id: Ie84e3cd7a417a89870752cb21bd7d562c3427284
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 470bacd..6f94714 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -493,10 +493,10 @@
space::ContinuousMemMapAllocSpace* source_space);
static bool AllocatorHasAllocationStack(AllocatorType allocator_type) {
- return allocator_type == kAllocatorTypeFreeList;
+ return allocator_type != kAllocatorTypeBumpPointer;
}
static bool AllocatorHasConcurrentGC(AllocatorType allocator_type) {
- return allocator_type == kAllocatorTypeFreeList;
+ return allocator_type != kAllocatorTypeBumpPointer;
}
bool ShouldAllocLargeObject(mirror::Class* c, size_t byte_count) const;
ALWAYS_INLINE void CheckConcurrentGC(Thread* self, size_t new_num_bytes_allocated,