summaryrefslogtreecommitdiffstats
path: root/runtime/monitor.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-07-16 13:28:58 -0700
committerMathieu Chartier <mathieuc@google.com>2014-07-22 17:25:32 -0700
commitb363f666883860d40823d5528df3c98c897f74f4 (patch)
treed4b629045d7e1d3e9236a0d8625b4ccbd0dbfc0f /runtime/monitor.cc
parentddc211980aa2f6149905d8d26f67201ac8e400b3 (diff)
downloadart-b363f666883860d40823d5528df3c98c897f74f4.tar.gz
art-b363f666883860d40823d5528df3c98c897f74f4.tar.bz2
art-b363f666883860d40823d5528df3c98c897f74f4.zip
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
Diffstat (limited to 'runtime/monitor.cc')
-rw-r--r--runtime/monitor.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index b33b286f8b..aee30868ed 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -747,10 +747,10 @@ mirror::Object* Monitor::MonitorEnter(Thread* self, mirror::Object* obj) {
contention_count++;
Runtime* runtime = Runtime::Current();
if (contention_count <= runtime->GetMaxSpinsBeforeThinkLockInflation()) {
- // TODO: Consider switch thread state to kBlocked when we are yielding.
+ // TODO: Consider switching the thread state to kBlocked when we are yielding.
// Use sched_yield instead of NanoSleep since NanoSleep can wait much longer than the
// parameter you pass in. This can cause thread suspension to take excessively long
- // make long pauses. See b/16307460.
+ // and make long pauses. See b/16307460.
sched_yield();
} else {
contention_count = 0;