Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 3c24f495b20d276c1cc0052b07f9a20ef0a59fca..55742bfaa1cfa6a4c52e86c2ebb3c1f96c68fbbb 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -608,6 +608,11 @@ void Heap::CollectAllAvailableGarbage(const char* gc_reason) { |
// Note: as weak callbacks can execute arbitrary code, we cannot |
// hope that eventually there will be no weak callbacks invocations. |
// Therefore stop recollecting after several attempts. |
+ if (FLAG_concurrent_recompilation) { |
+ // The optimizing compiler may be unnecessarily holding onto memory. |
Hannes Payer (out of office)
2013/09/24 13:28:07
on to
|
+ DisallowHeapAllocation no_recursive_gc; |
+ isolate()->optimizing_compiler_thread()->Flush(); |
+ } |
mark_compact_collector()->SetFlags(kMakeHeapIterableMask | |
kReduceMemoryFootprintMask); |
isolate_->compilation_cache()->Clear(); |