From 4f102a43fa6d36a3dcb105c424454399640df415 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sun, 31 Jul 2022 10:47:54 +0200 Subject: Also use __libc_memalign instead of posix_memalign --- src/custommem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/custommem.c') diff --git a/src/custommem.c b/src/custommem.c index 7d0d82f0..25c55063 100644 --- a/src/custommem.c +++ b/src/custommem.c @@ -414,7 +414,7 @@ uintptr_t AddNewDynarecMap(dynablock_t* db, size_t size) } #ifndef USE_MMAP void *p = NULL; - if(posix_memalign(&p, box64_pagesize, MMAPSIZE)) { + if(!(p=box_memalign(box64_pagesize, MMAPSIZE))) { dynarec_log(LOG_INFO, "Cannot create memory map of %d byte for dynarec block #%zu\n", MMAPSIZE, i); --mmapsize; return 0; @@ -517,7 +517,7 @@ uintptr_t AllocDynarecMap(dynablock_t* db, size_t size) if(size>MMAPSIZE-2*sizeof(blockmark_t)) { #ifndef USE_MMAP void *p = NULL; - if(posix_memalign(&p, box64_pagesize, size)) { + if(!(p=box_memalign(box64_pagesize, size))) { dynarec_log(LOG_INFO, "Cannot create dynamic map of %zu bytes\n", size); return 0; } -- cgit 1.4.1