about summary refs log tree commit diff stats
path: root/src/custommem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/custommem.c')
-rw-r--r--src/custommem.c4
1 files changed, 2 insertions, 2 deletions
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;
         }