From a447221d66d67bc2be3d8b62942e5a4dcf869b6f Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 16 Jul 2024 01:19:02 +0100 Subject: [PATCH] Updated memory calculation logic for MacOS The available physical memory computation now includes the inactive_count along with the free_count. --- indra/llcommon/llmemory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index c296112a4c..ced68a5212 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -154,7 +154,7 @@ void LLMemory::updateMemoryInfo() // align MemInfo across platforms // sAvailPhysicalMemInKB = U32Bytes(vmstat.free_count * page_size); // sMaxPhysicalMemInKB = LLMemoryInfo::getHardwareMemSize(); - avail_phys = U32Bytes(vmstat.free_count * page_size); + avail_phys = U32Bytes( (vmstat.free_count + vmstat.inactive_count) * page_size); sMaxHeapSizeInKB = LLMemoryInfo::getHardwareMemSize(); // }