- Timestamp:
- Oct 27, 2010 1:19:37 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r33458 r33504 66 66 #include <iprt/cpp/xml.h> /* xml::XmlFileWriter::s_psz*Suff. */ 67 67 #include <iprt/string.h> 68 #include <iprt/system.h> 68 69 69 70 #include <VBox/com/array.h> … … 155 156 #if HC_ARCH_BITS == 64 156 157 /* Default value decision pending. */ 157 mHWVirtExLargePagesEnabled = false; 158 uint64_t cbRam = 0; 159 160 if ( RTSystemQueryTotalRam(&cbRam) == VINF_SUCCESS 161 && cbRam >= (UINT64_C(6) * _1G)) 162 { 163 mHWVirtExLargePagesEnabled = true; 164 } 165 else 166 mHWVirtExLargePagesEnabled = false; 158 167 #else 159 168 /* Not supported on 32 bits hosts. */ -
trunk/src/VBox/Main/xml/Settings.cpp
r33396 r33504 72 72 #include <iprt/ldr.h> 73 73 #include <iprt/cpp/lock.h> 74 #include <iprt/system.h> 74 75 75 76 // generated header … … 1531 1532 fHardwareVirtExclusive(HWVIRTEXCLUSIVEDEFAULT), 1532 1533 fNestedPaging(true), 1533 fLargePages(false),1534 1534 fVPID(true), 1535 1535 fHardwareVirtForce(false), … … 1563 1563 #if HC_ARCH_BITS == 64 || defined(RT_OS_WINDOWS) || defined(RT_OS_DARWIN) 1564 1564 fPAE = true; 1565 #endif 1566 1567 /* The default value of large page supports depends on the host: 1568 * - 64 bits host -> true if sufficient RAM available. 1569 * - 32 bits host -> false 1570 */ 1571 #if HC_ARCH_BITS == 64 1572 uint64_t cbRam = 0; 1573 1574 if ( RTSystemQueryTotalRam(&cbRam) == VINF_SUCCESS 1575 && cbRam >= (UINT64_C(6) * _1G)) 1576 { 1577 fLargePages = true; 1578 } 1579 else 1580 fLargePages = false; 1581 #else 1582 /* Not supported on 32 bits hosts. */ 1583 fLargePages = false; 1565 1584 #endif 1566 1585 } … … 3196 3215 pelmCPU->setAttribute("executionCap", hw.ulCpuExecutionCap); 3197 3216 3198 if (hw.fLargePages)3199 3217 /* Always save this setting as we have changed the default in 4.0 (on for large memory 64-bit systems). */ 3218 pelmCPU->createChild("HardwareVirtExLargePages")->setAttribute("enabled", hw.fLargePages); 3200 3219 3201 3220 if (m->sv >= SettingsVersion_v1_9)
Note:
See TracChangeset
for help on using the changeset viewer.