VirtualBox

Changeset 36897 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Apr 29, 2011 3:11:55 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71476
Message:

PGM: work in progress...

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r36893 r36897  
    580580
    581581/**
     582 * Rebuilds the RAM range search trees.
     583 *
     584 * @param   pVM         The VM handle.
     585 */
     586static void pgmR3PhysRebuildRamRangeSearchTrees(PVM pVM)
     587{
     588#ifdef PGM_USE_RAMRANGE_SEARCH_TREES
     589    /*
     590     * Create the three balanced trees by sequentially working the linked list.
     591     */
     592
     593    /* Count them and calculate the max depth. */
     594    unsigned cRanges = 0;
     595    for (PPGMRAMRANGE pRam = pVM->pgm.s.pRamRangesXR3; pRam; pRam = pRam->pNextR3)
     596        cRanges++;
     597
     598    /// contine later
     599
     600#endif
     601}
     602
     603
     604/**
    582605 * Relinks the RAM ranges using the pSelfRC and pSelfR0 pointers.
    583606 *
     
    626649    }
    627650    ASMAtomicIncU32(&pVM->pgm.s.idRamRangesGen);
     651
     652    pgmR3PhysRebuildRamRangeSearchTrees(pVM);
     653
    628654}
    629655
     
    662688    }
    663689    ASMAtomicIncU32(&pVM->pgm.s.idRamRangesGen);
     690
     691    pgmR3PhysRebuildRamRangeSearchTrees(pVM);
    664692    pgmUnlock(pVM);
    665693}
     
    696724    }
    697725    ASMAtomicIncU32(&pVM->pgm.s.idRamRangesGen);
     726
     727    pgmR3PhysRebuildRamRangeSearchTrees(pVM);
    698728    pgmUnlock(pVM);
    699729}
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r36893 r36897  
    13001300    /** Pointer to self - RC pointer. */
    13011301    RCPTRTYPE(struct PGMRAMRANGE *)     pSelfRC;
     1302
     1303#ifdef PGM_USE_RAMRANGE_SEARCH_TREES
     1304    /** Pointer to the left search three node - ring-3 context. */
     1305    R3PTRTYPE(struct PGMRAMRANGE *)     pLeftR3;
     1306    /** Pointer to the right search three node - ring-3 context. */
     1307    R3PTRTYPE(struct PGMRAMRANGE *)     pRightR3;
     1308    /** Pointer to the left search three node - ring-0 context. */
     1309    R0PTRTYPE(struct PGMRAMRANGE *)     pLeftR0;
     1310    /** Pointer to the right search three node - ring-0 context. */
     1311    R0PTRTYPE(struct PGMRAMRANGE *)     pRightR0;
     1312    /** Pointer to the left search three node - raw-mode context. */
     1313    RCPTRTYPE(struct PGMRAMRANGE *)     pLeftRC;
     1314    /** Pointer to the right search three node - raw-mode context. */
     1315    RCPTRTYPE(struct PGMRAMRANGE *)     pRightRC;
     1316#endif
     1317
    13021318    /** Padding to make aPage aligned on sizeof(PGMPAGE). */
    13031319    uint32_t                            au32Alignment2[HC_ARCH_BITS == 32 ? 1 : 3];
Note: See TracChangeset for help on using the changeset viewer.

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