ggml : use sysconf(_SC_PAGESIZE) instead of getpagesize() derived from BSD
sed -i 's,getpagesize(),sysconf(_SC_PAGESIZE),g' ggml.c
This commit is contained in:
parent
77f9bd7c23
commit
2c716c0441
1 changed files with 1 additions and 1 deletions
2
ggml.c
2
ggml.c
|
@ -194,7 +194,7 @@ typedef void * thread_ret_t;
|
|||
inline static void * ggml_aligned_malloc(size_t size) {
|
||||
void * aligned_memory = NULL;
|
||||
#ifdef GGML_USE_METAL
|
||||
int result = posix_memalign(&aligned_memory, getpagesize(), size);
|
||||
int result = posix_memalign(&aligned_memory, sysconf(_SC_PAGESIZE), size);
|
||||
#else
|
||||
int result = posix_memalign(&aligned_memory, GGML_MEM_ALIGN, size);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue