Fix compile error if compiling without pools.

meow-7.2.2
Nicky 2013-01-06 06:26:19 +01:00
parent 290b69df7c
commit 3d8029dfc9
1 changed files with 17 additions and 2 deletions

View File

@ -75,6 +75,7 @@ namespace OSAllocator
void *malloc( size_t aSize, size_t aAlign )
{
nd::debugging::sEBP *pEBP(0);
#ifdef LOG_ALLOCATION_STACKS
if( aSize >= MIN_ALLOC_SIZE_FOR_LOG_STACK && aSize <= MAX_ALLOC_SIZE_FOR_LOG_STACK )
pEBP = nd::debugging::getEBP();
@ -420,13 +421,27 @@ namespace nd
void *malloc( size_t aSize, size_t aAlign )
{
nd::allocstats::addStat( aSize );
nd::debugging::sEBP *pEBP(0);
#ifdef LOG_ALLOCATION_STACKS
if( aSize >= MIN_ALLOC_SIZE_FOR_LOG_STACK && aSize <= MAX_ALLOC_SIZE_FOR_LOG_STACK )
pEBP = nd::debugging::getEBP();
#endif
nd::allocstats::logAllocation( aSize, pEBP );
return OSAllocator::malloc( aSize, aAlign );
}
void *realloc( void *ptr, size_t aSize, size_t aAlign )
{
nd::allocstats::addStat( aSize );
nd::debugging::sEBP *pEBP(0);
#ifdef LOG_ALLOCATION_STACKS
if( aSize >= MIN_ALLOC_SIZE_FOR_LOG_STACK && aSize <= MAX_ALLOC_SIZE_FOR_LOG_STACK )
pEBP = nd::debugging::getEBP();
#endif
nd::allocstats::logAllocation( aSize, pEBP );
return OSAllocator::realloc( ptr, aSize, aAlign );
}