void Heap::GetTreeStats (size_t & totalBytes, size_t & totalPeak, int & totalInstances) const { totalBytes += m_bytesAllocated; totalPeak += m_bytesPeak; totalInstances += m_nInstances; Heap * pChild = m_pFirstChild; while (pChild != NULL) { pChild->GetTreeStats(totalBytes, totalPeak, totalInstances); pChild = pChild->m_pNextSibling; } }