This commit is contained in:
Liru Færs
2019-10-10 15:09:43 -04:00
9 changed files with 99 additions and 206 deletions

View File

@@ -990,7 +990,7 @@ bool LLAppViewer::init()
minSpecs += "\n";
unsupported = true;
}
if(gSysMemory.getPhysicalMemoryClamped() < minRAM)
if(gSysMemory.getPhysicalMemoryKB() < minRAM)
{
minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedRAM");
minSpecs += "\n";
@@ -2692,8 +2692,8 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE();
gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2();
gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB().value());
gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated.valueInUnits<LLUnits::Kilobytes>());
gDebugInfo["RAMInfo"]["Physical"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().value());
gDebugInfo["RAMInfo"]["Allocated"] = LLSD::Integer(gMemoryAllocated.valueInUnits<LLUnits::Kilobytes>());
gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple();
// The user is not logged on yet, but record the current grid choice login url

View File

@@ -679,7 +679,7 @@ void LLFeatureManager::applyBaseMasks()
maskFeatures(gpustr);
// now mask cpu type ones
if (gSysMemory.getPhysicalMemoryClamped() <= U32Megabytes(256))
if (gSysMemory.getPhysicalMemoryKB() <= U32Megabytes(256))
{
maskFeatures("RAM256MB");
}

View File

@@ -238,9 +238,9 @@ void display_stats()
F32 mem_log_freq = gSavedSettings.getF32("MemoryLogFrequency");
if (mem_log_freq > 0.f && gRecentMemoryTime.getElapsedTimeF32() >= mem_log_freq)
{
gMemoryAllocated = (U64Bytes)LLMemory::getCurrentRSS();
gMemoryAllocated = U64Bytes(LLMemory::getCurrentRSS());
U32Megabytes memory = gMemoryAllocated;
LL_INFOS() << llformat("MEMORY: %d MB", memory.value()) << LL_ENDL;
LL_INFOS() << "MEMORY: " << memory << LL_ENDL;
LL_INFOS() << "THREADS: "<< LLThread::getCount() << LL_ENDL;
LL_INFOS() << "MALLOC: " << SGMemStat::getPrintableStat() <<LL_ENDL;
LLMemory::logMemoryInfo(TRUE) ;

View File

@@ -1295,7 +1295,7 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage
S32Megabytes LLViewerTextureList::getMinVideoRamSetting()
{
S32Megabytes system_ram = gSysMemory.getPhysicalMemoryKB();
LL_INFOS() << system_ram << LL_ENDL;
//LL_INFOS() << system_ram << LL_ENDL;
//min texture mem sets to 64M if total physical mem is more than 1.5GB
return (system_ram > S32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ;
}
@@ -1325,15 +1325,15 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl
{
if (!get_recommended)
{
max_texmem = (S32Megabytes)512;
max_texmem = S32Megabytes(512);
}
else if (gSavedSettings.getBOOL("NoHardwareProbe")) //did not do hardware detection at startup
{
max_texmem = (S32Megabytes)512;
max_texmem = S32Megabytes(512);
}
else
{
max_texmem = (S32Megabytes)128;
max_texmem = S32Megabytes(128);
}
LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL;

View File

@@ -385,7 +385,7 @@ public:
static const LLCachedControl<bool> debug_show_memory("DebugShowMemory");
if (debug_show_memory)
{
addText(xpos, ypos, llformat("Memory: %d (KB)", LLMemory::getWorkingSetSize() / 1024));
addText(xpos, ypos, llformat("Memory: %d (KB)", LLMemory::getCurrentRSS() / 1024));
ypos += y_inc;
}
#endif