summaryrefslogtreecommitdiffstats
path: root/runtime/gc/heap-inl.h
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2014-03-11 12:19:04 -0700
committerHiroshi Yamauchi <yamauchi@google.com>2014-03-11 14:09:03 -0700
commit5ccd498d4aa450b0381344724b072a932709a59a (patch)
tree4a5b80f095a507f852e4d39b256359e43c3eba7e /runtime/gc/heap-inl.h
parentf1375cd6367fba8b192b7628769931853c25e942 (diff)
downloadart-5ccd498d4aa450b0381344724b072a932709a59a.zip
art-5ccd498d4aa450b0381344724b072a932709a59a.tar.gz
art-5ccd498d4aa450b0381344724b072a932709a59a.tar.bz2
Put the post zygote non-moving space next to the malloc space.
This change fixes the following problem with the GSS collector: if the post zygote non-moving space happens to be located after the bump pointer spaces, the bump pointer space is treated wrongfully as an immune space. The reasons are 1) the immune space is represented by a simple address range and 2) the GSS collector treats the post zygote non-moving space as an immune space at a bump pointer space only collection. In addition, this change makes it a reality that all the non-moving spaces are adjacent, which we tend to assume in the code (eg. the notion of the immune space represented by a simple address range.) This should help avoid potential confusions in the future. Fix a DCHECK failure where usable_size isn't set properly when -XX:UseTLAB is used. Change-Id: I585920e433744a390f87e9a25bef6114b2a4623f
Diffstat (limited to 'runtime/gc/heap-inl.h')
-rw-r--r--runtime/gc/heap-inl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/gc/heap-inl.h b/runtime/gc/heap-inl.h
index b80e72e..533e5df 100644
--- a/runtime/gc/heap-inl.h
+++ b/runtime/gc/heap-inl.h
@@ -218,6 +218,7 @@ inline mirror::Object* Heap::TryToAllocate(Thread* self, AllocatorType allocator
ret = self->AllocTlab(alloc_size);
DCHECK(ret != nullptr);
*bytes_allocated = alloc_size;
+ *usable_size = alloc_size;
break;
}
default: {