summaryrefslogtreecommitdiffstats
path: root/runtime/gc/heap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/gc/heap.cc')
-rw-r--r--runtime/gc/heap.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 87ee21b..1fcbe4d 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -318,6 +318,16 @@ void Heap::ChangeAllocator(AllocatorType allocator) {
}
}
+void Heap::DisableCompaction() {
+ if (IsCompactingGC(post_zygote_collector_type_)) {
+ post_zygote_collector_type_ = kCollectorTypeCMS;
+ }
+ if (IsCompactingGC(background_collector_type_)) {
+ background_collector_type_ = post_zygote_collector_type_;
+ }
+ TransitionCollector(post_zygote_collector_type_);
+}
+
std::string Heap::SafeGetClassDescriptor(mirror::Class* klass) {
if (!IsValidContinuousSpaceObjectAddress(klass)) {
return StringPrintf("<non heap address klass %p>", klass);