| // Copyright 2026 The IREE Authors | |
| // | |
| // Licensed under the Apache License v2.0 with LLVM Exceptions. | |
| // See https://llvm.org/LICENSE.txt for license information. | |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| // <sys/mman.h> for wasm32 (stubs — no virtual memory on wasm). | |
| #ifndef IREE_WASM_LIBC_SYS_MMAN_H_ | |
| #define IREE_WASM_LIBC_SYS_MMAN_H_ | |
| #include <stddef.h> | |
| #define PROT_NONE 0 | |
| #define PROT_READ 1 | |
| #define PROT_WRITE 2 | |
| #define PROT_EXEC 4 | |
| #define MAP_SHARED 0x01 | |
| #define MAP_PRIVATE 0x02 | |
| #define MAP_FIXED 0x10 | |
| #define MAP_ANONYMOUS 0x20 | |
| #define MAP_ANON MAP_ANONYMOUS | |
| #define MAP_FAILED ((void*)-1) | |
| void* mmap(void* addr, size_t length, int prot, int flags, int fd, long offset); | |
| int munmap(void* addr, size_t length); | |
| int mprotect(void* addr, size_t length, int prot); | |
| #endif // IREE_WASM_LIBC_SYS_MMAN_H_ |