Changeset 107 in vbox for trunk/src/VBox/VMM/MM.cpp
- Timestamp:
- Jan 17, 2007 3:40:32 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/MM.cpp
r54 r107 193 193 { 194 194 LogFlow(("MMR3InitPaging:\n")); 195 bool fPreAlloc; 196 int rc = CFGMR3QueryBool(CFGMR3GetRoot(pVM), "RamPreAlloc", &fPreAlloc); 197 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 198 fPreAlloc = false; 199 else 200 AssertMsgRCReturn(rc, ("Configuration error: Failed to query integer \"RamPreAlloc\", rc=%Vrc.\n", rc), rc); 201 195 202 uint64_t cbRam; 196 bool fPreAlloc = false; 197 198 int rc = CFGMR3QueryU64(CFGMR3GetRoot(pVM), "RamSize", &cbRam); 203 rc = CFGMR3QueryU64(CFGMR3GetRoot(pVM), "RamSize", &cbRam); 199 204 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 200 205 cbRam = 0; 201 202 rc = CFGMR3QueryBool(CFGMR3GetRoot(pVM), "RamPreAlloc", &fPreAlloc);203 if (rc == VERR_CFGM_VALUE_NOT_FOUND)204 fPreAlloc = false;205 206 206 if (VBOX_SUCCESS(rc) || rc == VERR_CFGM_VALUE_NOT_FOUND) 207 207 { … … 212 212 } 213 213 #ifdef PGM_DYNAMIC_RAM_ALLOC 214 Log(("MM: %llu bytes of RAM \n", cbRam));214 Log(("MM: %llu bytes of RAM%s\n", cbRam, fPreAlloc ? " (PreAlloc)" : "")); 215 215 pVM->mm.s.pvRamBaseHC = 0; /** @todo obsolete */ 216 216 pVM->mm.s.cbRamBase = cbRam & PAGE_BASE_GC_MASK; … … 225 225 if (fPreAlloc) 226 226 { 227 RTGCPHYS GCPhys = PGM_DYNAMIC_CHUNK_SIZE; 228 229 for (;GCPhys < cbRam ; GCPhys+=PGM_DYNAMIC_CHUNK_SIZE) 227 for (RTGCPHYS GCPhys = PGM_DYNAMIC_CHUNK_SIZE; GCPhys < cbRam; GCPhys += PGM_DYNAMIC_CHUNK_SIZE) 230 228 { 231 229 rc = PGM3PhysGrowRange(pVM, GCPhys); … … 449 447 PSUPPAGE pPhysPage = &pLockedMem->aPhysPages[0]; 450 448 for (unsigned c = cPages; c > 0; c--, pPhysPage++) 451 pPhysPage->uReserved = ( unsigned)pLockedMem;449 pPhysPage->uReserved = (RTHCUINTPTR)pLockedMem; 452 450 453 451 /*
Note:
See TracChangeset
for help on using the changeset viewer.