diff options
| author | Roger Luedecke <roger.luedecke@gmail.com> | 2026-09-15 15:11:36 -0700 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-09-16 21:03:26 +0300 |
| commit | 8802e40a411aa9d28d8193aa0f0d2bad238b2f2f (patch) | |
| tree | 7fdfdd56e75ed015b4779d6180bceaabb5d56343 /indra/llmessage/llsdhttpserver.cpp | |
| parent | cb35e21dca397c25ebf0ec0414552c622f548939 (diff) | |
Fix Linux available memory reporting to use MemAvailable instead of get_avphys_pages()
On Linux, get_avphys_pages() maps to sysconf(_SC_AVPHYS_PAGES) which returns
only completely unallocated pages (MemFree). The Linux kernel eagerly uses
spare physical RAM for disk caching (buff/cache). When active disk caching
fills memory, MemFree routinely hovers between 200-500 MB even when gigabytes
of memory are available.
This caused the viewer's memory budget logic to falsely report low system
memory (<256 MB), repeatedly triggering emergency texture downrezzing loops
and dynamic draw-distance halving.
Replace get_avphys_pages() in LLMemoryInfo::updateAvailableMemory() with a
fast, non-allocating single fread of MemAvailable: from /proc/meminfo
(available on Linux >= 3.14), with fallback to get_avphys_pages().
Diffstat (limited to 'indra/llmessage/llsdhttpserver.cpp')
0 files changed, 0 insertions, 0 deletions
