VirtualBox

Changeset 12814 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Sep 29, 2008 6:14:37 PM (16 years ago)
Author:
vboxsync
Message:

#1865: more MM changes.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/MMAll.cpp

    r11153 r12814  
    4545{
    4646    /** @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);
    4848    for (;;)
    4949    {
     
    5252            case MMLOOKUPHYPERTYPE_LOCKED:
    5353            {
    54                 const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.Locked.pvHC;
     54                const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.Locked.pvR3;
    5555                if (off < pLookup->cb)
    5656                {
     
    6363            case MMLOOKUPHYPERTYPE_HCPHYS:
    6464            {
    65                 const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.HCPhys.pvHC;
     65                const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.HCPhys.pvR3;
    6666                if (off < pLookup->cb)
    6767                {
     
    8585        if (pLookup->offNext ==  (int32_t)NIL_OFFSET)
    8686            break;
    87         pLookup = (PMMLOOKUPHYPER)((char *)pLookup + pLookup->offNext);
     87        pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
    8888    }
    8989
     
    132132    /** @todo cache last lookup this stuff ain't cheap! */
    133133    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);
    135135    for (;;)
    136136    {
     
    154154        if (pLookup->offNext == (int32_t)NIL_OFFSET)
    155155            break;
    156         pLookup = (PMMLOOKUPHYPER)((char *)pLookup + pLookup->offNext);
     156        pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
    157157    }
    158158
     
    195195    {
    196196        case MMLOOKUPHYPERTYPE_LOCKED:
    197             return (RTR3PTR)((RTR3UINTPTR)pLookup->u.Locked.pvHC + off);
     197            return (RTR3PTR)((RTR3UINTPTR)pLookup->u.Locked.pvR3 + off);
    198198        case MMLOOKUPHYPERTYPE_HCPHYS:
    199             return (RTR3PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pvHC + off);
     199            return (RTR3PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pvR3 + off);
    200200        default:
    201201            AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
     
    219219            if (pLookup->u.Locked.pvR0)
    220220                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);
    222223        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);
    224226        default:
    225227            AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
  • trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp

    r12792 r12814  
    213213     * Get heap and statisticsStatistics.
    214214     */
    215     PMMHYPERHEAP pHeap = CTXSUFF(pVM->mm.s.pHyperHeap);
     215    PMMHYPERHEAP pHeap = pVM->mm.s.CTX_SUFF(pHyperHeap);
    216216#ifdef VBOX_WITH_STATISTICS
    217217    PMMHYPERSTAT pStat = mmHyperStat(pHeap, enmTag);
     
    758758                    ("%p: u32Magic=%#x\n", pv, pHeap->u32Magic),
    759759                    VERR_INVALID_POINTER);
    760 Assert(pHeap == CTXSUFF(pVM->mm.s.pHyperHeap));
     760Assert(pHeap == pVM->mm.s.CTX_SUFF(pHyperHeap));
    761761
    762762    /* Some more verifications using additional info from pHeap. */
     
    11171117{
    11181118#ifdef MMHYPER_HEAP_STRICT
    1119     mmHyperHeapCheck(CTXSUFF(pVM->mm.s.pHyperHeap));
     1119    mmHyperHeapCheck(pVM->mm.s.CTX_SUFF(pHyperHeap));
    11201120#endif
    11211121}
     
    11301130{
    11311131    Log(("MMHyperHeapDump: *** heap dump - start ***\n"));
    1132     PMMHYPERHEAP pHeap = CTXSUFF(pVM->mm.s.pHyperHeap);
     1132    PMMHYPERHEAP pHeap = pVM->mm.s.CTX_SUFF(pHyperHeap);
    11331133    PMMHYPERCHUNKFREE pCur = (PMMHYPERCHUNKFREE)pHeap->CTX_SUFF(pbHeap);
    11341134    for (;;)
     
    11531153MMDECL(size_t) MMHyperHeapGetFreeSize(PVM pVM)
    11541154{
    1155     return CTXSUFF(pVM->mm.s.pHyperHeap)->cbFree;
     1155    return pVM->mm.s.CTX_SUFF(pHyperHeap)->cbFree;
    11561156}
    11571157
     
    11631163MMDECL(size_t) MMHyperHeapGetSize(PVM pVM)
    11641164{
    1165     return CTXSUFF(pVM->mm.s.pHyperHeap)->cbHeap;
     1165    return pVM->mm.s.CTX_SUFF(pHyperHeap)->cbHeap;
    11661166}
    11671167
  • trunk/src/VBox/VMM/VMMAll/MMAllPhys.cpp

    r8155 r12814  
    22/** @file
    33 * 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.
    47 */
    58
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette