Commits

nat_linden committed 41b542c

CHOP-753: make getAvailableMemoryKB() only load data on Windows.
(per Monty code review)
Other platforms return -1 anyway, so don't need to call load methods.

Comments (0)

Files changed (1)

indra/llcommon/llsys.cpp

 //static
 void LLMemoryInfo::getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb)
 {
+#if LL_WINDOWS
 	// Sigh, this shouldn't be a static method, then we wouldn't have to
 	// reload this data separately from refresh()
 	LLSD statsMap(loadStatsMap(loadStatsArray()));
 
-#if LL_WINDOWS
 	avail_physical_mem_kb = statsMap["Avail Physical KB"].asInteger();
 	avail_virtual_mem_kb  = statsMap["Avail Virtual KB"].asInteger();