From: Johannes Gäßler Date: Sat, 6 Sep 2025 11:28:44 +0000 (+0200) Subject: ggml-cpu: document use of "free" memory [no ci] (llama/15834) X-Git-Tag: v0.9.1~77 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=adf1e4504d643491dd7323a56436985e8f1e40e9;p=pkg%2Fggml%2Fsources%2Fggml ggml-cpu: document use of "free" memory [no ci] (llama/15834) --- diff --git a/src/ggml-cpu/ggml-cpu.cpp b/src/ggml-cpu/ggml-cpu.cpp index 3fb46aaa..0c15165f 100644 --- a/src/ggml-cpu/ggml-cpu.cpp +++ b/src/ggml-cpu/ggml-cpu.cpp @@ -348,8 +348,10 @@ static void ggml_backend_cpu_device_get_memory(ggml_backend_dev_t dev, size_t * long pages = sysconf(_SC_PHYS_PAGES); long page_size = sysconf(_SC_PAGE_SIZE); *total = pages * page_size; + + // "free" system memory is ill-defined, for practical purposes assume that all of it is free: *free = *total; -#endif +#endif // _WIN32 GGML_UNUSED(dev); }