Procházet zdrojové kódy

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 před 11 roky
rodič
revize
cbd1b74586
1 změnil soubory, kde provedl 16 přidání a 1 odebrání
  1. 16
    1
      cmMem.c

+ 16
- 1
cmMem.c Zobrazit soubor

@@ -518,8 +518,11 @@ void* cmMmAllocate(
518 518
        // p->nextId is incremented here
519 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 527
          cmErrMsg(&p->err,kOkMmRC,"Breakpoint for memory allocation id:%i.",p->nextId);
525 528
        }
@@ -553,11 +556,23 @@ void* cmMmAllocate(
553 556
 
554 557
      }
555 558
      else // a reallocation occurred.
559
+     {
556 560
        if( orgDataPtr == ndp )
557 561
        {
558 562
          if((rp = _cmMmFindRecd(p,orgDataPtr)) == NULL )
559 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 578
    return ndp;

Načítá se…
Zrušit
Uložit