Changeset 32908 in vbox
- Timestamp:
- Oct 5, 2010 11:52:17 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 66391
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r32885 r32908 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 313 330 class ConfigError : public iprt::Error 314 331 { … … 678 695 InsertConfigInteger(pRoot, "HwVirtExtForced", fHwVirtExtForced); 679 696 697 698 /* 699 * MM values. 700 */ 701 PCFGMNODE pMM; 702 uint32_t cbHyperHeap = computeHyperHeapSize(chipsetType, cCpus, fHwVirtExtForced); 703 InsertConfigNode(pRoot, "MM", &pMM); 704 InsertConfigInteger(pMM, "cbHyperHeap", cbHyperHeap); 705 706 /* 707 * Hardware virtualization settings. 708 */ 680 709 PCFGMNODE pHWVirtExt; 681 710 InsertConfigNode(pRoot, "HWVirtExt", &pHWVirtExt); -
trunk/src/VBox/VMM/MMHyper.cpp
r31978 r32908 75 75 uint32_t cbHyperHeap; 76 76 int rc = CFGMR3QueryU32(CFGMR3GetChild(CFGMR3GetRoot(pVM), "MM"), "cbHyperHeap", &cbHyperHeap); 77 if (rc == VERR_CFGM_NO_PARENT || rc == VERR_CFGM_VALUE_NOT_FOUND) 78 { 79 if (pVM->cCpus > 1) 80 cbHyperHeap = _2M + pVM->cCpus * _64K; 81 else 82 cbHyperHeap = VMMIsHwVirtExtForced(pVM) 83 ? 640*_1K 84 : 1280*_1K; 85 } 86 else 87 AssertLogRelRCReturn(rc, rc); 77 AssertLogRelRCReturn(rc, rc); 88 78 cbHyperHeap = RT_ALIGN_32(cbHyperHeap, PAGE_SIZE); 89 79 LogRel(("MM: cbHyperHeap=%#x (%u)\n", cbHyperHeap, cbHyperHeap));
Note:
See TracChangeset
for help on using the changeset viewer.