Browse Source

cmMem.c : Added a comment at the location where breakpoints may be set

to stop on the reallocation of a memory block with a known 'uniqueId'.
master
kevin 11 years ago
parent
commit
cbd1b74586
1 changed files with 16 additions and 1 deletions
  1. 16
    1
      cmMem.c

+ 16
- 1
cmMem.c View File

518
        // p->nextId is incremented here
518
        // p->nextId is incremented here
519
        cmThUIntIncr(&p->nextId,1);
519
        cmThUIntIncr(&p->nextId,1);
520
 
520
 
521
+       
521
        /*
522
        /*
522
-       if( p->nextId == 2393 )
523
+         // breakpoint for noticing allocation of memory blocks - see below for
524
+         // the location to notice reallocations of memory blocks
525
+       if( p->nextId == 7218 )
523
        {
526
        {
524
          cmErrMsg(&p->err,kOkMmRC,"Breakpoint for memory allocation id:%i.",p->nextId);
527
          cmErrMsg(&p->err,kOkMmRC,"Breakpoint for memory allocation id:%i.",p->nextId);
525
        }
528
        }
553
 
556
 
554
      }
557
      }
555
      else // a reallocation occurred.
558
      else // a reallocation occurred.
559
+     {
556
        if( orgDataPtr == ndp )
560
        if( orgDataPtr == ndp )
557
        {
561
        {
558
          if((rp = _cmMmFindRecd(p,orgDataPtr)) == NULL )
562
          if((rp = _cmMmFindRecd(p,orgDataPtr)) == NULL )
559
            cmErrMsg(&p->err,kMissingRecdMmRC,"Unable to locate a tracking record associated with reallocation data area pointer:%p.",orgDataPtr);           
563
            cmErrMsg(&p->err,kMissingRecdMmRC,"Unable to locate a tracking record associated with reallocation data area pointer:%p.",orgDataPtr);           
564
+         else
565
+         {
566
+           /*
567
+             // break point for noticing reallocations on a memory block
568
+           if( rp->uniqueId == 7218 )
569
+           {
570
+             cmErrMsg(&p->err,kOkMmRC,"Breakpoint for memory reallocation id:%i.",p->nextId);
571
+           }
572
+           */
573
+         }
560
        }
574
        }
575
+     }
561
    }
576
    }
562
 
577
 
563
    return ndp;
578
    return ndp;

Loading…
Cancel
Save