diff options
| author | Mathieu Chartier <mathieuc@google.com> | 2015-02-20 18:44:28 +0000 |
|---|---|---|
| committer | Mathieu Chartier <mathieuc@google.com> | 2015-02-20 18:44:28 +0000 |
| commit | ac195160c299f1c7a87144da7dccb9411df3c1fd (patch) | |
| tree | 5fa58b8aac78fb8f7d9e8db68f71fb869f9a1e34 /runtime | |
| parent | c0a7e2bb1609da40ec67cb7e00c918637c610897 (diff) | |
| download | art-ac195160c299f1c7a87144da7dccb9411df3c1fd.tar.gz art-ac195160c299f1c7a87144da7dccb9411df3c1fd.tar.bz2 art-ac195160c299f1c7a87144da7dccb9411df3c1fd.zip | |
Revert "Do GC for alloc for unstarted runtimes"
Bug: 19451379
This reverts commit c0a7e2bb1609da40ec67cb7e00c918637c610897.
Change-Id: Ib079e5ce1647fd44239f7f2f658b2c50d619fece
Diffstat (limited to 'runtime')
| -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 452980cf7a..419d5558a8 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. } } |
