defs.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (c) 2013 Richard Braun.
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef VM_DEFS_H
  18. #define VM_DEFS_H
  19. // Advice values.
  20. #define VM_ADV_NORMAL 0
  21. #define VM_ADV_RANDOM 1
  22. #define VM_ADV_SEQUENTIAL 2
  23. #define VM_ADV_WILLNEED 3
  24. #define VM_ADV_DONTNEED 4
  25. #define VM_ADV_DEFAULT VM_ADV_NORMAL
  26. // Inheritance values.
  27. #define VM_INHERIT_NONE 0
  28. #define VM_INHERIT_SHARE 1
  29. #define VM_INHERIT_COPY 2
  30. #define VM_INHERIT_DEFAULT VM_INHERIT_COPY
  31. // Protection flags.
  32. #define VM_PROT_NONE 0
  33. #define VM_PROT_READ 1
  34. #define VM_PROT_WRITE 2
  35. #define VM_PROT_EXEC 4
  36. #define VM_PROT_RDWR (VM_PROT_READ | VM_PROT_WRITE)
  37. #define VM_PROT_ALL (VM_PROT_RDWR | VM_PROT_EXEC)
  38. #endif