Skip to content

Commit 2ed2179

Browse files
JohannesGaesslerwalidbr
authored andcommitted
ggml-cpu: document use of "free" memory [no ci] (ggml-org#15834)
1 parent f18fede commit 2ed2179

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ggml/src/ggml-cpu/ggml-cpu.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,10 @@ static void ggml_backend_cpu_device_get_memory(ggml_backend_dev_t dev, size_t *
348348
long pages = sysconf(_SC_PHYS_PAGES);
349349
long page_size = sysconf(_SC_PAGE_SIZE);
350350
*total = pages * page_size;
351+
352+
// "free" system memory is ill-defined, for practical purposes assume that all of it is free:
351353
*free = *total;
352-
#endif
354+
#endif // _WIN32
353355

354356
GGML_UNUSED(dev);
355357
}

0 commit comments

Comments
 (0)