mman.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #define MAP_FAILED ((void *) -1)
  2. #define PROT_NONE 0
  3. #define PROT_READ 1
  4. #define PROT_WRITE 2
  5. #define PROT_EXEC 4
  6. #define PROT_GROWSDOWN 0x01000000
  7. #define PROT_GROWSUP 0x02000000
  8. #define MAP_SHARED 0x01
  9. #define MAP_PRIVATE 0x02
  10. #define MAP_FIXED 0x10
  11. #define MAP_TYPE 0x0f
  12. #define MAP_FILE 0x00
  13. #define MAP_ANON 0x800
  14. #define MAP_ANONYMOUS MAP_ANON
  15. #define MAP_NORESERVE 0x0400
  16. #define MAP_GROWSDOWN 0x1000
  17. #define MAP_DENYWRITE 0x2000
  18. #define MAP_EXECUTABLE 0x4000
  19. #define MAP_LOCKED 0x8000
  20. #define MAP_POPULATE 0x10000
  21. #define MAP_NONBLOCK 0x20000
  22. #define MAP_STACK 0x40000
  23. #define MAP_HUGETLB 0x80000
  24. #define POSIX_MADV_NORMAL 0
  25. #define POSIX_MADV_RANDOM 1
  26. #define POSIX_MADV_SEQUENTIAL 2
  27. #define POSIX_MADV_WILLNEED 3
  28. #define POSIX_MADV_DONTNEED 0
  29. #define MS_ASYNC 1
  30. #define MS_INVALIDATE 2
  31. #define MS_SYNC 4
  32. #define MCL_CURRENT 1
  33. #define MCL_FUTURE 2
  34. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  35. #define MADV_NORMAL 0
  36. #define MADV_RANDOM 1
  37. #define MADV_SEQUENTIAL 2
  38. #define MADV_WILLNEED 3
  39. #define MADV_DONTNEED 4
  40. #define MADV_REMOVE 9
  41. #define MADV_DONTFORK 10
  42. #define MADV_DOFORK 11
  43. #define MADV_MERGEABLE 12
  44. #define MADV_UNMERGEABLE 13
  45. #define MADV_HUGEPAGE 14
  46. #define MADV_NOHUGEPAGE 15
  47. #define MADV_DONTDUMP 16
  48. #define MADV_DODUMP 17
  49. #define MADV_HWPOISON 100
  50. #define MREMAP_MAYMOVE 1
  51. #define MREMAP_FIXED 2
  52. #endif