From ed1c13c0ec9200c193f59bb925e9ca4483588679 Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 15 Jan 2014 11:55:46 -0500 Subject: [PATCH] cmMem.c : Moved unique id break point comment after where the unique id is calculated. --- cmMem.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/cmMem.c b/cmMem.c index 97732e4..061e731 100644 --- a/cmMem.c +++ b/cmMem.c @@ -176,7 +176,7 @@ cmMmRC_t _cmMmFreeP( cmMm_t* p, void* dataPtr ) if( rp == NULL ) return cmErrMsg(&p->err,kMissingRecdMmRC,"Unable to locate a tracking record associated with released data area pointer:%p.",dataPtr); /* - if( rp->uniqueId == 176690 ) + if( rp->uniqueId == 59451 ) { cmErrMsg(&p->err,kOkMmRC,"Breakpoint for memory free id:%i.",rp->uniqueId); } @@ -494,18 +494,7 @@ void* cmMmAllocate( unsigned newByteCnt = newEleCnt * newEleByteCnt; void* ndp = _cmMmAllocate(p,orgDataPtr,newByteCnt,flags); - /* - if( p->nextId == 189114 ) - { - cmErrMsg(&p->err,kOkMmRC,"Breakpoint for memory allocation id:%i.",p->nextId); - } - - if( (long long)_cmMmDataToBasePtr(ndp,p->guardByteCnt) == 0x7fffed8d0b40 ) - { - cmErrMsg(&p->err,kOkMmRC,"Breakpoint for memory allocation id:%i.",p->nextId); - } - */ - + // if we are tracking changes if( cmIsFlag(p->flags,kTrackMmFl) ) @@ -526,8 +515,23 @@ void* cmMmAllocate( return ndp; } + // p->nextId is incremented here cmThUIntIncr(&p->nextId,1); + /* + if( p->nextId == 2393 ) + { + cmErrMsg(&p->err,kOkMmRC,"Breakpoint for memory allocation id:%i.",p->nextId); + } + */ + /* + if( (long long)_cmMmDataToBasePtr(ndp,p->guardByteCnt) == 0x7fffed8d0b40 ) + { + cmErrMsg(&p->err,kOkMmRC,"Breakpoint for memory allocation id:%i.",p->nextId); + } + */ + + // initialize the new tracking recd rp->dataPtr = ndp; rp->dataByteCnt = newByteCnt;