diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-02-20 18:44:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-02-20 18:44:40 +0000 |
commit | a5a3f03405e33edb5c73cb4aa58fb09fb46318f3 (patch) | |
tree | a814e7875db5a5e7d91decdc0b377a3a914d8580 /runtime/gc | |
parent | 4ba405483177cf346211d43d97892bae6ff14119 (diff) | |
parent | ac195160c299f1c7a87144da7dccb9411df3c1fd (diff) | |
download | art-a5a3f03405e33edb5c73cb4aa58fb09fb46318f3.zip art-a5a3f03405e33edb5c73cb4aa58fb09fb46318f3.tar.gz art-a5a3f03405e33edb5c73cb4aa58fb09fb46318f3.tar.bz2 |
Merge "Revert "Do GC for alloc for unstarted runtimes""
Diffstat (limited to 'runtime/gc')
-rw-r--r-- | runtime/gc/heap.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 452980c..419d555 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -3154,12 +3154,8 @@ void Heap::ClearConcurrentGCRequest() { } void Heap::RequestConcurrentGC(Thread* self) { - // If we don't have a started runtime, then we don't have a thread which is running the heap - // tasks. In this case, do the GC in the allocating thread to ensure that memory gets freed. - if (!Runtime::Current()->IsFinishedStarting()) { - CollectGarbageInternal(collector::kGcTypeFull, kGcCauseForAlloc, false); - } else if (CanAddHeapTask(self) && - concurrent_gc_pending_.CompareExchangeStrongSequentiallyConsistent(false, true)) { + if (CanAddHeapTask(self) && + concurrent_gc_pending_.CompareExchangeStrongSequentiallyConsistent(false, true)) { task_processor_->AddTask(self, new ConcurrentGCTask(NanoTime())); // Start straight away. } } |