| 366 | return result; |
| 367 | } |
| 368 | virtual void Free( void* mem ) { |
| 369 | if ( !mem ) { |
| 370 | return; |
| 371 | } |
| 372 | --_currentAllocs; |
| 373 | Chunk* chunk = static_cast<Chunk*>( mem ); |
| 374 | #ifdef DEBUG |
| 375 | memset( chunk, 0xfe, sizeof(Chunk) ); |
| 376 | #endif |
| 377 | chunk->next = _root; |
| 378 | _root = chunk; |
| 379 | } |
| 380 | void Trace( const char* name ) { |
| 381 | printf( "Mempool %s watermark=%d [%dk] current=%d size=%d nAlloc=%d blocks=%d\n", |
| 382 | name, _maxAllocs, _maxAllocs*SIZE/1024, _currentAllocs, SIZE, _nAllocs, _blockPtrs.Size() ); |
no outgoing calls
no test coverage detected