summaryrefslogtreecommitdiffstats
path: root/runtime/gc/collector/sticky_mark_sweep.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-02-03 14:00:42 -0800
committerMathieu Chartier <mathieuc@google.com>2014-02-03 16:00:05 -0800
commit1f3b5358b28a83f0929bdd8ce738f06908677fb7 (patch)
tree81545b9a91de8bde45f55c7dbc8a9d5358a89bdb /runtime/gc/collector/sticky_mark_sweep.cc
parent1f00671edaaa34578319d0fdaf605600ed539d41 (diff)
downloadart-1f3b5358b28a83f0929bdd8ce738f06908677fb7.zip
art-1f3b5358b28a83f0929bdd8ce738f06908677fb7.tar.gz
art-1f3b5358b28a83f0929bdd8ce738f06908677fb7.tar.bz2
Move SwapBitmaps to ContinuousMemMapAllocSpace.
Moved the SwapBitmaps function to ContinuousMemMapAllocSpace since the zygote space uses this function during full GC. Fixed a place where we were casting a ZygoteSpace to a MallocSpace, somehow this didn't cause any issues in non-debug builds. Moved the CollectGarbage in PreZygoteFork before the lock to prevent an occasional lock level violation caused by attempting to enqueue java lang references with the a lock. Bug: 12876255 Change-Id: I77439e46d5b26b37724bdcee3a0948410f1b0eb4
Diffstat (limited to 'runtime/gc/collector/sticky_mark_sweep.cc')
-rw-r--r--runtime/gc/collector/sticky_mark_sweep.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/gc/collector/sticky_mark_sweep.cc b/runtime/gc/collector/sticky_mark_sweep.cc
index 30f3753..9e3adb4 100644
--- a/runtime/gc/collector/sticky_mark_sweep.cc
+++ b/runtime/gc/collector/sticky_mark_sweep.cc
@@ -38,7 +38,7 @@ void StickyMarkSweep::BindBitmaps() {
// know what was allocated since the last GC. A side-effect of binding the allocation space mark
// and live bitmap is that marking the objects will place them in the live bitmap.
for (const auto& space : GetHeap()->GetContinuousSpaces()) {
- if (space->IsMallocSpace() &&
+ if (space->IsContinuousMemMapAllocSpace() &&
space->GetGcRetentionPolicy() == space::kGcRetentionPolicyAlwaysCollect) {
DCHECK(space->IsContinuousMemMapAllocSpace());
space->AsContinuousMemMapAllocSpace()->BindLiveToMarkBitmap();