Source/platform/heap/HeapTest.cpp
// Do several GCs to make sure that later GCs don't free up old memory from
// previously run tests in this process.
Do several GCs to make sure that later GCs don't free up old memory from
previously run tests in this process.
Do several GCs to make sure that later GCs don ' t free up old memory from previously run tests in this process .
static void clearOutOldGarbage(HeapStats* heapStats)
{
    while (true) {
        getHeapStats(heapStats);
        size_t used = heapStats->totalObjectSpace();
        Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
        getHeapStats(heapStats);
        if (heapStats->totalObjectSpace() >= used)
            break;
    }
}
static void clearOutOldGarbage ( HeapStats * heapStats ) { while ( true ) { getHeapStats ( heapStats ) ; size_t used = heapStats -> totalObjectSpace ( ) ; Heap :: collectGarbage ( ThreadState :: NoHeapPointersOnStack ) ; getHeapStats ( heapStats ) ; if ( heapStats -> totalObjectSpace ( ) >= used ) break ; } }
Do several GCs to make sure that later GCs don't free up old memory from
previously run tests in this process.
Do several GCs to make sure that later GCs don ' t free up old memory from previously run tests in this process .