Changeset 32910 in vbox
- Timestamp:
- Oct 5, 2010 12:33:56 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r32908 r32910 311 311 } 312 312 313 static uint32_t computeHyperHeapSize(ChipsetType_T chipsetType, uint32_t cCpus, bool fHwVirtExtForced)314 {315 uint32_t singleCpuBaseSize;316 317 if (cCpus > 1)318 return _2M + cCpus * _64K;319 320 if (chipsetType == ChipsetType_PIIX3)321 {322 /* Size must be kept like this for saved state compatibility */323 return fHwVirtExtForced ? 640*_1K : 1280*_1K;324 }325 326 327 return 1280*_1K;328 }329 330 313 class ConfigError : public iprt::Error 331 314 { … … 700 683 */ 701 684 PCFGMNODE pMM; 702 uint32_t cbHyperHeap = computeHyperHeapSize(chipsetType, cCpus, fHwVirtExtForced);703 685 InsertConfigNode(pRoot, "MM", &pMM); 704 InsertConfigInteger(pMM, " cbHyperHeap", cbHyperHeap);686 InsertConfigInteger(pMM, "CanUseLargerHeap", chipsetType == ChipsetType_ICH9); 705 687 706 688 /* -
trunk/src/VBox/VMM/MMHyper.cpp
r32908 r32910 45 45 46 46 47 DECLINLINE(uint32_t) computeHyperHeapSize(bool fCanUseLargerHeap, uint32_t cCpus, bool fHwVirtExtForced) 48 { 49 if (cCpus > 1) 50 return _2M + cCpus * _64K; 51 52 if (fCanUseLargerHeap) 53 return 1280*_1K; 54 else 55 /* Size must be kept like this for saved state compatibility */ 56 return fHwVirtExtForced ? 640*_1K : 1280*_1K; 57 } 47 58 48 59 … … 73 84 * precious kernel space on heap for the PATM. 74 85 */ 75 uint32_t cbHyperHeap; 76 int rc = CFGMR3QueryU32(CFGMR3GetChild(CFGMR3GetRoot(pVM), "MM"), "cbHyperHeap", &cbHyperHeap); 86 PCFGMNODE pMM = CFGMR3GetChild(CFGMR3GetRoot(pVM), "MM"); 87 bool fCanUseLargerHeap = false; 88 int rc = CFGMR3QueryBoolDef(pMM, "CanUseLargerHeap", &fCanUseLargerHeap, false); 89 uint32_t cbHyperHeap = computeHyperHeapSize(fCanUseLargerHeap, pVM->cCpus, VMMIsHwVirtExtForced(pVM)); 90 rc = CFGMR3QueryU32Def(pMM, "cbHyperHeap", &cbHyperHeap, cbHyperHeap); 77 91 AssertLogRelRCReturn(rc, rc); 92 78 93 cbHyperHeap = RT_ALIGN_32(cbHyperHeap, PAGE_SIZE); 79 94 LogRel(("MM: cbHyperHeap=%#x (%u)\n", cbHyperHeap, cbHyperHeap)); … … 1375 1390 } 1376 1391 } 1377
Note:
See TracChangeset
for help on using the changeset viewer.