fix: iOS page size

This commit is contained in:
Gilad S 2024-10-15 03:38:47 +03:00
parent 4455c7f073
commit de7836a4e3

View file

@ -414,8 +414,8 @@ void * ggml_aligned_malloc(size_t size) {
break; break;
} }
#elif GGML_USE_METAL #elif GGML_USE_METAL
const auto page_size = sysconf(_SC_PAGESIZE); const long page_size = sysconf(_SC_PAGESIZE);
int result = posix_memalign(&aligned_memory, MAX(TENSOR_ALIGNMENT, page_size), sysconf(_SC_PAGESIZE), size); int result = posix_memalign(&aligned_memory, MAX(TENSOR_ALIGNMENT, page_size), size);
#else #else
int result = posix_memalign(&aligned_memory, TENSOR_ALIGNMENT, size); int result = posix_memalign(&aligned_memory, TENSOR_ALIGNMENT, size);
#endif #endif