| 45 | fextl::unique_ptr<Alloc::HostAllocator> Alloc64 {}; |
| 46 | |
| 47 | void* FEX_mmap(void* addr, size_t length, int prot, int flags, int fd, off_t offset) { |
| 48 | void* Result = Alloc64->Mmap(addr, length, prot, flags, fd, offset); |
| 49 | if (Result >= (void*)-4096) { |
| 50 | errno = -(uint64_t)Result; |
| 51 | return (void*)-1; |
| 52 | } |
| 53 | return Result; |
| 54 | } |
| 55 | int FEX_munmap(void* addr, size_t length) { |
| 56 | int Result = Alloc64->Munmap(addr, length); |
| 57 |