Changeset 12814 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Sep 29, 2008 6:14:37 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/MMAll.cpp
r11153 r12814 45 45 { 46 46 /** @todo cache last lookup this stuff ain't cheap! */ 47 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)(( char*)CTXSUFF(pVM->mm.s.pHyperHeap) + pVM->mm.s.offLookupHyper);47 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.CTX_SUFF(pHyperHeap) + pVM->mm.s.offLookupHyper); 48 48 for (;;) 49 49 { … … 52 52 case MMLOOKUPHYPERTYPE_LOCKED: 53 53 { 54 const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.Locked.pv HC;54 const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.Locked.pvR3; 55 55 if (off < pLookup->cb) 56 56 { … … 63 63 case MMLOOKUPHYPERTYPE_HCPHYS: 64 64 { 65 const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.HCPhys.pv HC;65 const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.HCPhys.pvR3; 66 66 if (off < pLookup->cb) 67 67 { … … 85 85 if (pLookup->offNext == (int32_t)NIL_OFFSET) 86 86 break; 87 pLookup = (PMMLOOKUPHYPER)(( char*)pLookup + pLookup->offNext);87 pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext); 88 88 } 89 89 … … 132 132 /** @todo cache last lookup this stuff ain't cheap! */ 133 133 unsigned offRC = (RTRCUINTPTR)RCPtr - (RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC; 134 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)(( char*)CTXSUFF(pVM->mm.s.pHyperHeap) + pVM->mm.s.offLookupHyper);134 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.CTX_SUFF(pHyperHeap) + pVM->mm.s.offLookupHyper); 135 135 for (;;) 136 136 { … … 154 154 if (pLookup->offNext == (int32_t)NIL_OFFSET) 155 155 break; 156 pLookup = (PMMLOOKUPHYPER)(( char*)pLookup + pLookup->offNext);156 pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext); 157 157 } 158 158 … … 195 195 { 196 196 case MMLOOKUPHYPERTYPE_LOCKED: 197 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.Locked.pv HC+ off);197 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.Locked.pvR3 + off); 198 198 case MMLOOKUPHYPERTYPE_HCPHYS: 199 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pv HC+ off);199 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pvR3 + off); 200 200 default: 201 201 AssertMsgFailed(("enmType=%d\n", pLookup->enmType)); … … 219 219 if (pLookup->u.Locked.pvR0) 220 220 return (RTR0PTR)((RTR0UINTPTR)pLookup->u.Locked.pvR0 + off); 221 return (RTR0PTR)((RTR3UINTPTR)pLookup->u.Locked.pvHC + off); 221 /** @todo #1865: accessing ring-3 memory (LOCKED)! */ 222 return (RTR0PTR)((RTR3UINTPTR)pLookup->u.Locked.pvR3 + off); 222 223 case MMLOOKUPHYPERTYPE_HCPHYS: 223 return (RTR0PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pvHC + off); 224 /** @todo #1865: accessing ring-3 memory (HCPHYS)! */ 225 return (RTR0PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pvR3 + off); 224 226 default: 225 227 AssertMsgFailed(("enmType=%d\n", pLookup->enmType)); -
trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp
r12792 r12814 213 213 * Get heap and statisticsStatistics. 214 214 */ 215 PMMHYPERHEAP pHeap = CTXSUFF(pVM->mm.s.pHyperHeap);215 PMMHYPERHEAP pHeap = pVM->mm.s.CTX_SUFF(pHyperHeap); 216 216 #ifdef VBOX_WITH_STATISTICS 217 217 PMMHYPERSTAT pStat = mmHyperStat(pHeap, enmTag); … … 758 758 ("%p: u32Magic=%#x\n", pv, pHeap->u32Magic), 759 759 VERR_INVALID_POINTER); 760 Assert(pHeap == CTXSUFF(pVM->mm.s.pHyperHeap));760 Assert(pHeap == pVM->mm.s.CTX_SUFF(pHyperHeap)); 761 761 762 762 /* Some more verifications using additional info from pHeap. */ … … 1117 1117 { 1118 1118 #ifdef MMHYPER_HEAP_STRICT 1119 mmHyperHeapCheck( CTXSUFF(pVM->mm.s.pHyperHeap));1119 mmHyperHeapCheck(pVM->mm.s.CTX_SUFF(pHyperHeap)); 1120 1120 #endif 1121 1121 } … … 1130 1130 { 1131 1131 Log(("MMHyperHeapDump: *** heap dump - start ***\n")); 1132 PMMHYPERHEAP pHeap = CTXSUFF(pVM->mm.s.pHyperHeap);1132 PMMHYPERHEAP pHeap = pVM->mm.s.CTX_SUFF(pHyperHeap); 1133 1133 PMMHYPERCHUNKFREE pCur = (PMMHYPERCHUNKFREE)pHeap->CTX_SUFF(pbHeap); 1134 1134 for (;;) … … 1153 1153 MMDECL(size_t) MMHyperHeapGetFreeSize(PVM pVM) 1154 1154 { 1155 return CTXSUFF(pVM->mm.s.pHyperHeap)->cbFree;1155 return pVM->mm.s.CTX_SUFF(pHyperHeap)->cbFree; 1156 1156 } 1157 1157 … … 1163 1163 MMDECL(size_t) MMHyperHeapGetSize(PVM pVM) 1164 1164 { 1165 return CTXSUFF(pVM->mm.s.pHyperHeap)->cbHeap;1165 return pVM->mm.s.CTX_SUFF(pHyperHeap)->cbHeap; 1166 1166 } 1167 1167 -
trunk/src/VBox/VMM/VMMAll/MMAllPhys.cpp
r8155 r12814 2 2 /** @file 3 3 * MM - Memory Monitor(/Manager) - Physical Memory. 4 * 5 * @remarks This will will be eliminated ASAP, all physical memory management 6 * is done by PGM now. 4 7 */ 5 8
Note:
See TracChangeset
for help on using the changeset viewer.