Changeset 20900 in vbox for trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
- Timestamp:
- Jun 24, 2009 6:05:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r20899 r20900 923 923 unsigned cFree = 0; 924 924 925 gmmR0UnlinkChunk(pChunk); /* avoiding cFreePages updates. */ 926 925 927 uint16_t hGVM = pGVM->hSelf; 926 928 unsigned iPage = (GMM_CHUNK_SIZE >> PAGE_SHIFT); … … 935 937 * The reason for not using gmmR0FreePrivatePage here is that we 936 938 * must *not* cause the chunk to be freed from under us - we're in 937 * a AVL tree walk here.939 * an AVL tree walk here. 938 940 */ 939 941 pChunk->aPages[iPage].u = 0; … … 942 944 pChunk->iFreeHead = iPage; 943 945 pChunk->cPrivate--; 944 if ((pChunk->cFree & GMM_CHUNK_FREE_SET_MASK) == 0) 945 { 946 gmmR0UnlinkChunk(pChunk); 947 pChunk->cFree++; 948 gmmR0LinkChunk(pChunk, pChunk->cShared ? &g_pGMM->Shared : &g_pGMM->Private); 949 } 950 else 951 pChunk->cFree++; 946 pChunk->cFree++; 952 947 pGVM->gmm.s.cPrivatePages--; 953 948 cFree++; … … 960 955 else 961 956 cShared++; 957 958 gmmR0LinkChunk(pChunk, pChunk->cShared ? &g_pGMM->Shared : &g_pGMM->Private); 962 959 963 960 /* … … 1827 1824 */ 1828 1825 PGMMCHUNKFREESET pSet = &pGMM->Private; 1829 #if 0 /** @todo this is broken, at least on windows... */1830 1826 if (pSet->cFreePages < cPages) 1831 1827 return VERR_GMM_SEED_ME; 1832 #endif1833 1828 if (pGMM->fBoundMemoryMode) 1834 1829 { … … 1846 1841 return VERR_GMM_SEED_ME; 1847 1842 } 1848 else if (pSet->cFreePages < cPages) /* see #if 0 */1849 return VERR_GMM_SEED_ME;1850 1843 1851 1844 /*
Note:
See TracChangeset
for help on using the changeset viewer.