Index: Source/platform/heap/Heap.cpp |
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp |
index 876a650425a80bc41f97a856b5a833eefbb6dbfd..dcc20cd64871ef4a694f5b9f72c0abeeb6bfbe87 100644 |
--- a/Source/platform/heap/Heap.cpp |
+++ b/Source/platform/heap/Heap.cpp |
@@ -2396,8 +2396,14 @@ void Heap::collectAllGarbage() |
// because the hierarchy was not completely moved to the heap and |
// some heap allocated objects own objects that contain persistents |
// pointing to other heap allocated objects. |
- for (int i = 0; i < 5; ++i) |
+ size_t previousLiveObjects = 0; |
+ for (int i = 0; i < 5; ++i) { |
collectGarbage(ThreadState::NoHeapPointersOnStack, ThreadState::GCWithSweep, ForcedGCForTesting); |
+ size_t liveObjects = Heap::estimatedLiveObjectSize(); |
haraken
2015/04/13 23:12:12
Shall we use Heap::markedObjectSize()?
Conceptual
sof
2015/04/14 06:40:51
ok, let's leave estimatedLiveObjectSize() for the
|
+ if (liveObjects == previousLiveObjects) |
+ break; |
+ previousLiveObjects = liveObjects; |
+ } |
} |
double Heap::estimatedMarkingTime() |