Changeset 4766 in vbox for trunk/src/VBox
- Timestamp:
- Sep 13, 2007 11:05:58 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/MMPagePool.cpp
r4763 r4766 61 61 * Allocate the pool structures. 62 62 */ 63 int rc = MMHyperAlloc(pVM, sizeof(*pVM->mm.s.pPagePool), 0, MM_TAG_MM_PAGE, (void **)&pVM->mm.s.pPagePool); 63 AssertRelease(sizeof(*pVM->mm.s.pPagePool) + sizeof(*pVM->mm.s.pPagePoolLow) < PAGE_SIZE); 64 int rc = SUPPageAllocLocked(1, (void **)&pVM->mm.s.pPagePool); 64 65 if (VBOX_FAILURE(rc)) 65 66 return rc; 67 memset(pVM->mm.s.pPagePool, 0, PAGE_SIZE); 66 68 pVM->mm.s.pPagePool->pVM = pVM; 67 69 STAM_REG(pVM, &pVM->mm.s.pPagePool->cPages, STAMTYPE_U32, "/MM/Page/Def/cPages", STAMUNIT_PAGES, "Number of pages in the default pool."); … … 74 76 STAM_REG(pVM, &pVM->mm.s.pPagePool->cErrors, STAMTYPE_COUNTER, "/MM/Page/Def/cErrors", STAMUNIT_ERRORS,"Number of errors for the default pool."); 75 77 76 rc = MMHyperAlloc(pVM, sizeof(*pVM->mm.s.pPagePoolLow), 0, MM_TAG_MM_PAGE, (void **)&pVM->mm.s.pPagePoolLow); 77 if (VBOX_FAILURE(rc)) 78 return rc; 78 pVM->mm.s.pPagePoolLow = pVM->mm.s.pPagePool + 1; 79 79 pVM->mm.s.pPagePoolLow->pVM = pVM; 80 80 pVM->mm.s.pPagePoolLow->fLow = true;
Note:
See TracChangeset
for help on using the changeset viewer.