1 | // RUN: %clang %s -o %t && %run %t |
---|---|
2 | |
3 | #define _LARGEFILE64_SOURCE 1 |
4 | |
5 | #include <assert.h> |
6 | #include <sys/mman.h> |
7 | |
8 | int main() { |
9 | char *buf = (char *)mmap64(addr: 0, len: 100000, PROT_READ | PROT_WRITE, |
10 | MAP_PRIVATE | MAP_ANONYMOUS, fd: -1, offset: 0); |
11 | assert(buf); |
12 | munmap(addr: buf, len: 100000); |
13 | } |
14 |