test for issue64

This commit is contained in:
kanjitalk755 2020-10-28 12:57:28 +09:00
parent 3ce86cee1f
commit 87d4660aa6

View File

@ -263,11 +263,11 @@ void * vm_acquire(size_t size, int options)
if ((addr = mmap((caddr_t)next_address, size, VM_PAGE_DEFAULT, the_map_flags, fd, 0)) == (void *)MAP_FAILED) if ((addr = mmap((caddr_t)next_address, size, VM_PAGE_DEFAULT, the_map_flags, fd, 0)) == (void *)MAP_FAILED)
return VM_MAP_FAILED; return VM_MAP_FAILED;
#if USE_JIT
// Sanity checks for 64-bit platforms // Sanity checks for 64-bit platforms
if (sizeof(void *) == 8 && (options & VM_MAP_32BIT) && !((char *)addr <= (char *)0xffffffff)) if (sizeof(void *) == 8 && (options & VM_MAP_32BIT) && !((char *)addr <= (char *)0xffffffff))
return VM_MAP_FAILED; return VM_MAP_FAILED;
#endif
next_address = (char *)addr + size; next_address = (char *)addr + size;
#elif defined(HAVE_WIN32_VM) #elif defined(HAVE_WIN32_VM)
int alloc_type = MEM_RESERVE | MEM_COMMIT; int alloc_type = MEM_RESERVE | MEM_COMMIT;