github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/darwin/posix_mm.txt (about)

     1  # Copyright 2021 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  include <sys/types.h>
     5  include <sys/mman.h>
     6  
     7  mmap(addr vma, len len[addr], prot flags[mmap_prot], flags flags[mmap_flags], fd fd, offset fileoff)
     8  munmap(addr vma, len len[addr])
     9  mprotect(addr vma, len len[addr], prot flags[mmap_prot])
    10  msync(addr vma, len len[addr], f flags[msync_flags])
    11  madvise(addr vma, len len[addr], advice flags[madvise_flags])
    12  mlock(addr vma, size len[addr])
    13  munlock(addr vma, size len[addr])
    14  mlockall(flags flags[mlockall_flags])
    15  munlockall()
    16  
    17  mmap_prot = PROT_EXEC, PROT_READ, PROT_WRITE
    18  msync_flags = MS_ASYNC, MS_SYNC, MS_INVALIDATE
    19  mmap_flags = MAP_ANONYMOUS, MAP_ANON, MAP_FILE, MAP_FIXED, MAP_HASSEMAPHORE, MAP_PRIVATE, MAP_SHARED, MAP_NOCACHE, MAP_JIT, MAP_32BIT
    20  madvise_flags = MADV_NORMAL, POSIX_MADV_NORMAL, MADV_SEQUENTIAL, POSIX_MADV_SEQUENTIAL, MADV_RANDOM, POSIX_MADV_RANDOM, MADV_WILLNEED, POSIX_MADV_WILLNEED, MADV_DONTNEED, POSIX_MADV_DONTNEED, MADV_FREE, MADV_ZERO_WIRED_PAGES
    21  mlockall_flags = MCL_CURRENT, MCL_FUTURE
    22  
    23  define MAP_ANONYMOUS	MAP_ANON