Changeset 84633 in vbox for trunk/src/VBox/VMM/VMMR3/PGM.cpp
- Timestamp:
- Jun 2, 2020 11:12:01 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r82968 r84633 644 644 #include <iprt/string.h> 645 645 #include <iprt/thread.h> 646 #ifdef RT_OS_LINUX 647 # include <iprt/linux/sysfs.h> 648 #endif 646 649 647 650 … … 1039 1042 } 1040 1043 #endif 1044 1045 #ifdef RT_OS_LINUX 1046 /* 1047 * Log the /proc/sys/vm/max_map_count value on linux as that is 1048 * frequently giving us grief when too low. 1049 */ 1050 int64_t const cGuessNeeded = MMR3PhysGetRamSize(pVM) / _2M + 16384 /*guesstimate*/; 1051 int64_t cMaxMapCount = 0; 1052 int rc2 = RTLinuxSysFsReadIntFile(10, &cMaxMapCount, "/proc/sys/vm/max_map_count"); 1053 LogRel(("PGM: /proc/sys/vm/max_map_count = %RI64 (rc2=%Rrc); cGuessNeeded=%RI64\n", cMaxMapCount, rc2, cGuessNeeded)); 1054 if (RT_SUCCESS(rc2) && cMaxMapCount < cGuessNeeded) 1055 LogRel(("PGM: WARNING!!\n" 1056 "PGM: WARNING!! Please increase /proc/sys/vm/max_map_count to at least %RI64 (or reduce the amount of RAM assigned to the VM)!\n" 1057 "PGM: WARNING!!\n", cMaxMapCount)); 1058 1059 #endif 1060 1041 1061 return VINF_SUCCESS; 1042 1062 }
Note:
See TracChangeset
for help on using the changeset viewer.