Changeset 30826 in vbox
- Timestamp:
- Jul 14, 2010 12:48:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMPhys.cpp
r30823 r30826 3272 3272 static DECLCALLBACK(int) pgmR3PhysChunkUnmapCandidateCallback(PAVLLU32NODECORE pNode, void *pvUser) 3273 3273 { 3274 do 3275 { 3276 PPGMCHUNKR3MAP pChunk = (PPGMCHUNKR3MAP)((uint8_t *)pNode - RT_OFFSETOF(PGMCHUNKR3MAP, AgeCore)); 3277 if ( pChunk->iAge 3278 && !pChunk->cRefs) 3279 { 3280 /* 3281 * Check that it's not in any of the TLBs. 3282 */ 3283 PVM pVM = ((PPGMR3PHYSCHUNKUNMAPCB)pvUser)->pVM; 3284 for (unsigned i = 0; i < RT_ELEMENTS(pVM->pgm.s.ChunkR3Map.Tlb.aEntries); i++) 3285 if (pVM->pgm.s.ChunkR3Map.Tlb.aEntries[i].pChunk == pChunk) 3274 PPGMCHUNKR3MAP pChunk = (PPGMCHUNKR3MAP)((uint8_t *)pNode - RT_OFFSETOF(PGMCHUNKR3MAP, AgeCore)); 3275 if ( pChunk->iAge 3276 && !pChunk->cRefs) 3277 { 3278 /* 3279 * Check that it's not in any of the TLBs. 3280 */ 3281 PVM pVM = ((PPGMR3PHYSCHUNKUNMAPCB)pvUser)->pVM; 3282 for (unsigned i = 0; i < RT_ELEMENTS(pVM->pgm.s.ChunkR3Map.Tlb.aEntries); i++) 3283 if (pVM->pgm.s.ChunkR3Map.Tlb.aEntries[i].pChunk == pChunk) 3284 { 3285 pChunk = NULL; 3286 break; 3287 } 3288 if (pChunk) 3289 for (unsigned i = 0; i < RT_ELEMENTS(pVM->pgm.s.PhysTlbHC.aEntries); i++) 3290 if (pVM->pgm.s.PhysTlbHC.aEntries[i].pMap == pChunk) 3286 3291 { 3287 3292 pChunk = NULL; 3288 3293 break; 3289 3294 } 3290 if (pChunk) 3291 for (unsigned i = 0; i < RT_ELEMENTS(pVM->pgm.s.PhysTlbHC.aEntries); i++) 3292 if (pVM->pgm.s.PhysTlbHC.aEntries[i].pMap == pChunk) 3293 { 3294 pChunk = NULL; 3295 break; 3296 } 3297 if (pChunk) 3298 { 3299 ((PPGMR3PHYSCHUNKUNMAPCB)pvUser)->pChunk = pChunk; 3300 return 1; /* done */ 3301 } 3302 } 3303 3304 /* next with the same age - this version of the AVL API doesn't enumerate the list, so we have to do it. */ 3305 pNode = pNode->pList; 3306 } while (pNode); 3295 if (pChunk) 3296 { 3297 ((PPGMR3PHYSCHUNKUNMAPCB)pvUser)->pChunk = pChunk; 3298 return 1; /* done */ 3299 } 3300 } 3301 3307 3302 return 0; 3308 3303 }
Note:
See TracChangeset
for help on using the changeset viewer.