]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml-cpu: document use of "free" memory [no ci] (#15834)
authorJohannes Gäßler <redacted>
Sat, 6 Sep 2025 11:28:44 +0000 (13:28 +0200)
committerGitHub <redacted>
Sat, 6 Sep 2025 11:28:44 +0000 (13:28 +0200)
ggml/src/ggml-cpu/ggml-cpu.cpp

index 3fb46aaa4d8b53dac723a4ab93560f15b7840269..0c15165f1b88e128c5a50cee9d26d2c095047604 100644 (file)
@@ -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);
 }