Changeset 33192 in vbox for trunk/src/VBox/VMM/MMHyper.cpp
- Timestamp:
- Oct 18, 2010 11:54:33 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/MMHyper.cpp
r32910 r33192 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; 47 DECLINLINE(uint32_t) mmR3ComputeHyperHeapSize(PVM pVM, bool fCanUseLargerHeap) 48 { 49 bool fHwVirtExtForced = VMMIsHwVirtExtForced(pVM); 50 51 if (pVM->cCpus > 1) 52 return _1M + pVM->cCpus * 2 * _64K; 51 53 52 54 if (fCanUseLargerHeap) 53 55 return 1280*_1K; 54 56 else 55 /* Size must be kept like this for saved state compatibility */ 56 return fHwVirtExtForced ? 640*_1K : 1280*_1K; 57 if (fHwVirtExtForced) 58 { 59 /* Need a bit more space for large memory guests. */ 60 if (pVM->mm.s.cbRamBase >= _4G) 61 return _1M; 62 else 63 return 640 * _1K; 64 } 65 else 66 /* Size must be kept like this for saved state compatibility (only for raw mode though). */ 67 return 1280*_1K; 57 68 } 58 69 … … 87 98 bool fCanUseLargerHeap = false; 88 99 int rc = CFGMR3QueryBoolDef(pMM, "CanUseLargerHeap", &fCanUseLargerHeap, false); 89 uint32_t cbHyperHeap = computeHyperHeapSize(fCanUseLargerHeap, pVM->cCpus, VMMIsHwVirtExtForced(pVM));100 uint32_t cbHyperHeap = mmR3ComputeHyperHeapSize(pVM, fCanUseLargerHeap); 90 101 rc = CFGMR3QueryU32Def(pMM, "cbHyperHeap", &cbHyperHeap, cbHyperHeap); 91 102 AssertLogRelRCReturn(rc, rc);
Note:
See TracChangeset
for help on using the changeset viewer.