Changeset 31445 in vbox
- Timestamp:
- Aug 7, 2010 9:12:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp
r31402 r31445 146 146 (pEntry)->cUnrefs = 0; \ 147 147 } while (0) 148 149 150 /** @def PGMRZDYNMAP_STRICT_RELEASE 151 * Define this to force pages to be released and make non-present ASAP after 152 * use. This should not normally be enabled as it is a bit expensive. */ 153 #if 0 || defined(DOXYGEN_RUNNING) 154 # define PGMRZDYNMAP_STRICT_RELEASE 155 #endif 148 156 149 157 … … 1312 1320 AssertMsg(cRefs >= 0, ("%d\n", cRefs)); 1313 1321 if (!cRefs) 1322 { 1314 1323 pThis->cLoad--; 1324 #ifdef PGMRZDYNMAP_STRICT_RELEASE 1325 pThis->paPages[iPage].HCPhys = NIL_RTHCPHYS; 1326 ASMAtomicBitClear(pThis->paPages[iPage].uPte.pv, X86_PTE_BIT_P); 1327 ASMInvalidatePage(pThis->paPages[iPage].pvPage); 1328 #endif 1329 } 1315 1330 } 1316 1331 … … 1615 1630 cLoad++; 1616 1631 } 1617 #if def IN_RING01632 #if defined(IN_RING0) && !defined(PGMRZDYNMAP_STRICT_RELEASE) 1618 1633 else 1619 1634 CHECK_RET(paPages[iPage].uPte.pLegacy->u == paSavedPTEs[iPage], … … 2142 2157 * Find the entry in the usual unrolled fashion. 2143 2158 */ 2159 /** @todo add a hint to the set which entry was used last since it's not 2160 * always the last entry? */ 2144 2161 #define IS_MATCHING_ENTRY(pSet, iEntry, pvHint) \ 2145 2162 ( (pSet)->aEntries[(iEntry)].pvPage == (pvHint) \ … … 2215 2232 else 2216 2233 Log(("pgmRZDynMapUnusedHint: pvHint=%p ignored because of overflow! %s(%d) %s\n", pvHint, pszFile, iLine, pszFunction)); 2234 2235 #ifdef PGMRZDYNMAP_STRICT_RELEASE 2236 /* 2237 * Optimize the set to trigger the unmapping and invalidation of the page. 2238 */ 2239 if (cUnrefs + 1 == cTotalRefs) 2240 pgmDynMapOptimizeAutoSet(pSet); 2241 #endif 2217 2242 } 2218 2243
Note:
See TracChangeset
for help on using the changeset viewer.