MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / suitableMaxMem

Function suitableMaxMem

launcher/SysInfo.cpp:54–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54int suitableMaxMem()
55{
56 float totalRAM = (float)Sys::getSystemRam() / (float)Sys::mebibyte;
57 int maxMemoryAlloc;
58
59 // If totalRAM < 6GB, use (totalRAM / 1.5), else 4GB
60 if (totalRAM < (4096 * 1.5))
61 maxMemoryAlloc = (int)(totalRAM / 1.5);
62 else
63 maxMemoryAlloc = 4096;
64
65 return maxMemoryAlloc;
66}
67
68QString getSupportedJavaArchitecture()
69{

Callers 1

ApplicationMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected