void CBaseObject::ValidateBaseObjectDetail(void) { ValidateFlags(); ValidateAllocation(); ValidateDistToRoot(); ValidateIndex(); ValidateObjectsThisIn(); }
int CValidateAlloc::heapchk() { bool bOk = true; // Validate the heap HeapPrefix_t *pHeap = m_pFirstAllocation; for( pHeap = m_pFirstAllocation; pHeap; pHeap = pHeap->m_pNext ) { if ( !ValidateAllocation( pHeap ) ) { bOk = false; } } #ifdef _WIN32 return bOk ? _HEAPOK : 0; #elif _LINUX return bOk; #endif }
//----------------------------------------------------------------------------- // Remove from the list! //----------------------------------------------------------------------------- void CValidateAlloc::RemoveFromList( HeapPrefix_t *pHeap ) { if ( !pHeap ) return; ValidateAllocation( pHeap ); if ( pHeap->m_pPrev ) { pHeap->m_pPrev->m_pNext = pHeap->m_pNext; } else { m_pFirstAllocation = pHeap->m_pNext; } if ( pHeap->m_pNext ) { pHeap->m_pNext->m_pPrev = pHeap->m_pPrev; } }