From 0e81aac260981ee7ff840b06496ac9a2da0e4bd4 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Wed, 29 Apr 2026 15:05:09 -0700 Subject: [PATCH] docs/envvars: document ANV_SYS_MEM_LIMIT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This option was added by fdbdfaed0157 ("anv: add ANV_SYS_MEM_LIMIT for debugging system memory restrictions"). Acked-by: Tapani Pälli Signed-off-by: Paulo Zanoni Part-of: --- docs/envvars.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/envvars.rst b/docs/envvars.rst index 2ea9a30610a..fdcc2ed0c96 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -1002,6 +1002,23 @@ Anvil(ANV) driver environment variables advertised queues to include 1 queue with compute-only support, and it would override the number of graphics+compute queues to be 0. +.. envvar:: ANV_SYS_MEM_LIMIT + + Changes the amount of system memory that is available for graphics usage in + the Vulkan system memory heap. The variable accepts an integer from 10 to + 100, which represents the percentage of system memory that will be used as + the host memory heap size. The default value is 75 if the system has more + than 4GB of system RAM, 50 otherwise. + + Note that this memory is shared between the application's Vulkan allocations + and the system's general needs. If a value too close to 100 is set and fully + used, the driver may not have enough memory for its data structures and the + application may fail to perform system allocations (e.g., malloc()), which + may lead to errors or excessive memory swapping. + + This option can also be used to limit memory usage by memory-hungry + applications. + Hasvk driver environment variables ---------------------------------------