OSDN Git Service

Recycle mem-maps for collector transitions.
authorMathieu Chartier <mathieuc@google.com>
Wed, 16 Jul 2014 20:28:58 +0000 (13:28 -0700)
committerMathieu Chartier <mathieuc@google.com>
Wed, 23 Jul 2014 00:25:32 +0000 (17:25 -0700)
commitb363f666883860d40823d5528df3c98c897f74f4
treed4b629045d7e1d3e9236a0d8625b4ccbd0dbfc0f
parentddc211980aa2f6149905d8d26f67201ac8e400b3
Recycle mem-maps for collector transitions.

We now create spaces when we need them for collector transitions or
homogeneous compaction by recycling mem maps. Change the bump
pointer space size to be as large as the heap capacity instead of
1/2 heap capacity like it used to be. For GSS, bump pointer spaces
are set to 32MB currently.

Changed GSS to have main space == non moving space since we don't
need to copy from the main space.

Fixes GC stress tests 074, 096.
Fixed test 080 oom throw with -Xmx2m for GC stress test, this was
broken since it was allocating a 4 MB array before starting the
OOM process.

Bug: 14059466
Bug: 16406852
Change-Id: I62877cfa24ec944a6f34ffac30334f454a8002fd
16 files changed:
runtime/Android.mk
runtime/gc/collector/semi_space.cc
runtime/gc/heap.cc
runtime/gc/heap.h
runtime/gc/space/bump_pointer_space.cc
runtime/gc/space/bump_pointer_space.h
runtime/gc/space/large_object_space.cc
runtime/gc/space/large_object_space.h
runtime/gc/space/malloc_space.h
runtime/gc/space/space.h
runtime/gc/space/zygote_space.cc
runtime/gc/space/zygote_space.h
runtime/monitor.cc
runtime/runtime.h
test/080-oom-throw/src/Main.java
test/Android.run-test.mk