From de7836a4e34eb142ff8255ed975e998379f240a8 Mon Sep 17 00:00:00 2001 From: Gilad S Date: Tue, 15 Oct 2024 03:38:47 +0300 Subject: [PATCH] fix: iOS page size --- ggml/src/ggml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index a92600e01..48e9aa70d 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -414,8 +414,8 @@ void * ggml_aligned_malloc(size_t size) { break; } #elif GGML_USE_METAL - const auto page_size = sysconf(_SC_PAGESIZE); - int result = posix_memalign(&aligned_memory, MAX(TENSOR_ALIGNMENT, page_size), sysconf(_SC_PAGESIZE), size); + const long page_size = sysconf(_SC_PAGESIZE); + int result = posix_memalign(&aligned_memory, MAX(TENSOR_ALIGNMENT, page_size), size); #else int result = posix_memalign(&aligned_memory, TENSOR_ALIGNMENT, size); #endif