Changeset 40932 in vbox for trunk/src/VBox/Runtime/common/alloc
- Timestamp:
- Apr 16, 2012 3:44:08 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/alloc/heapsimple.cpp
r35525 r40932 318 318 /* Init the single free block. */ 319 319 pFree = pHeapInt->pFreeHead; 320 pFree->Core.pNext = NULL;321 pFree->Core.pPrev = NULL;320 pFree->Core.pNext = (PRTHEAPSIMPLEBLOCK)NULL; 321 pFree->Core.pPrev = (PRTHEAPSIMPLEBLOCK)NULL; 322 322 pFree->Core.pHeap = pHeapInt; 323 323 pFree->Core.fFlags = RTHEAPSIMPLEBLOCK_FLAGS_MAGIC | RTHEAPSIMPLEBLOCK_FLAGS_FREE; 324 pFree->pNext = NULL;325 pFree->pPrev = NULL;324 pFree->pNext = (PRTHEAPSIMPLEFREE)NULL; 325 pFree->pPrev = (PRTHEAPSIMPLEFREE)NULL; 326 326 pFree->cb = pHeapInt->cbFree; 327 327 … … 476 476 static PRTHEAPSIMPLEBLOCK rtHeapSimpleAllocBlock(PRTHEAPSIMPLEINTERNAL pHeapInt, size_t cb, size_t uAlignment) 477 477 { 478 PRTHEAPSIMPLEBLOCK pRet = NULL;478 PRTHEAPSIMPLEBLOCK pRet = (PRTHEAPSIMPLEBLOCK)NULL; 479 479 PRTHEAPSIMPLEFREE pFree; 480 480 … … 533 533 pPrev = (PRTHEAPSIMPLEBLOCK)(pHeapInt + 1); 534 534 Assert(pPrev == &pFree->Core); 535 pPrev->pPrev = NULL;535 pPrev->pPrev = (PRTHEAPSIMPLEBLOCK)NULL; 536 536 pPrev->pNext = &pFree->Core; 537 537 pPrev->pHeap = pHeapInt; … … 696 696 * of us (both lists are sorted by address). 697 697 */ 698 pLeft = NULL;699 pRight = NULL;698 pLeft = (PRTHEAPSIMPLEFREE)NULL; 699 pRight = (PRTHEAPSIMPLEFREE)NULL; 700 700 if (pHeapInt->pFreeTail) 701 701 { … … 728 728 Assert(pRight == pHeapInt->pFreeHead); 729 729 pFree->Core.fFlags |= RTHEAPSIMPLEBLOCK_FLAGS_FREE; 730 pFree->pPrev = NULL;730 pFree->pPrev = (PRTHEAPSIMPLEFREE)NULL; 731 731 pFree->pNext = pRight; 732 732 if (pRight) … … 806 806 static void rtHeapSimpleAssertAll(PRTHEAPSIMPLEINTERNAL pHeapInt) 807 807 { 808 PRTHEAPSIMPLEFREE pPrev = NULL;809 PRTHEAPSIMPLEFREE pPrevFree = NULL;808 PRTHEAPSIMPLEFREE pPrev = (PRTHEAPSIMPLEFREE)NULL; 809 PRTHEAPSIMPLEFREE pPrevFree = (PRTHEAPSIMPLEFREE)NULL; 810 810 PRTHEAPSIMPLEFREE pBlock; 811 811 for (pBlock = (PRTHEAPSIMPLEFREE)(pHeapInt + 1);
Note:
See TracChangeset
for help on using the changeset viewer.