Debian Codegraph @

compiler-rt/test/sanitizer_common/TestCases/Posix/mmap_test.c

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