Changeset 29551 in vbox
- Timestamp:
- May 17, 2010 2:15:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r29548 r29551 1823 1823 { 1824 1824 case GMMACCOUNT_BASE: 1825 if (RT_UNLIKELY(pGVM->gmm.s.Allocated.cBasePages + pGVM->gmm.s.cBalloonedPages + pGVM->gmm.s.cSharedPages +cPages > pGVM->gmm.s.Reserved.cBasePages))1825 if (RT_UNLIKELY(pGVM->gmm.s.Allocated.cBasePages + pGVM->gmm.s.cBalloonedPages + cPages > pGVM->gmm.s.Reserved.cBasePages)) 1826 1826 { 1827 1827 Log(("gmmR0AllocatePages:Base: Reserved=%#llx Allocated+Ballooned+Requested=%#llx+%#llx+%#x!\n", … … 2668 2668 pPage->Shared.cRefs++; 2669 2669 pGVM->gmm.s.cSharedPages++; 2670 pGVM->gmm.s.Allocated.cBasePages++; 2670 2671 } 2671 2672 #endif … … 2711 2712 { 2712 2713 case GMMACCOUNT_BASE: 2713 if (RT_UNLIKELY(pGVM->gmm.s.Allocated.cBasePages + pGVM->gmm.s.cSharedPages< cPages))2714 if (RT_UNLIKELY(pGVM->gmm.s.Allocated.cBasePages < cPages)) 2714 2715 { 2715 2716 Log(("gmmR0FreePages: allocated=%#llx cPages=%#x!\n", pGVM->gmm.s.Allocated.cBasePages, cPages)); … … 2743 2744 int rc = VINF_SUCCESS; 2744 2745 uint32_t iPage; 2745 uint32_t cSharedPages = 0;2746 2746 for (iPage = 0; iPage < cPages; iPage++) 2747 2747 { … … 2770 2770 Assert(pGVM->gmm.s.cSharedPages); 2771 2771 pGVM->gmm.s.cSharedPages--; 2772 cSharedPages++;2773 2772 Assert(pPage->Shared.cRefs); 2774 2773 if (!--pPage->Shared.cRefs) … … 2791 2790 } 2792 2791 2793 Assert(iPage > cSharedPages);2794 2795 2792 /* 2796 2793 * Update the account. … … 2798 2795 switch (enmAccount) 2799 2796 { 2800 case GMMACCOUNT_BASE: pGVM->gmm.s.Allocated.cBasePages -= (iPage - cSharedPages); break;2797 case GMMACCOUNT_BASE: pGVM->gmm.s.Allocated.cBasePages -= iPage; break; 2801 2798 case GMMACCOUNT_SHADOW: pGVM->gmm.s.Allocated.cShadowPages -= iPage; break; 2802 2799 case GMMACCOUNT_FIXED: pGVM->gmm.s.Allocated.cFixedPages -= iPage; break;
Note:
See TracChangeset
for help on using the changeset viewer.