diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-07-31 10:47:54 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-08-06 16:10:17 +0200 |
| commit | 4f102a43fa6d36a3dcb105c424454399640df415 (patch) | |
| tree | 69b4b3c6b0b9ea811f88e58d394bcfdc789a86a0 /src/custommem.c | |
| parent | 2ac265d52951c2951281b25aa0aba3ad21b6565f (diff) | |
| download | box64-4f102a43fa6d36a3dcb105c424454399640df415.tar.gz box64-4f102a43fa6d36a3dcb105c424454399640df415.zip | |
Also use __libc_memalign instead of posix_memalign
Diffstat (limited to 'src/custommem.c')
| -rw-r--r-- | src/custommem.c | 4 |
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; } |