#include <mach/vm_behavior.h> also included by <mach/mach.h>

mach/vm_behavior.h

File: mach/vm_behavior.h Virtual memory map behavior definitions.
14 macros · 1 typedef

typedefvm_behavior_t

typedef int vm_behavior_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
VM_BEHAVIOR_DEFAULTThe system's default behavior. Assumes strong locality of reference, so LRU page replacement, possibly with pre-fetch, would be appropriate.
VM_BEHAVIOR_RANDOMNo particular order expected. Assumes weak locality of reference, so LRU page replacement may be ineffective.
VM_BEHAVIOR_SEQUENTIALForward sequential order.
VM_BEHAVIOR_RSEQNTLReverse sequential order.

macroVM_BEHAVIOR_DEFAULT

The following behaviors affect the memory region's future behavior and are stored in the VM map entry data structure.
#define VM_BEHAVIOR_DEFAULT ((vm_behavior_t) 0)
default
CMU/MIT Mach reference · manual page · © Carnegie Mellon
The system's default behavior. Assumes strong locality of reference, so LRU page replacement, possibly with pre-fetch, would be appropriate.
a value of vm_behavior_t

macroVM_BEHAVIOR_RANDOM

#define VM_BEHAVIOR_RANDOM ((vm_behavior_t) 1)
random
CMU/MIT Mach reference · manual page · © Carnegie Mellon
No particular order expected. Assumes weak locality of reference, so LRU page replacement may be ineffective.
a value of vm_behavior_t

macroVM_BEHAVIOR_SEQUENTIAL

#define VM_BEHAVIOR_SEQUENTIAL ((vm_behavior_t) 2)
forward sequential
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Forward sequential order.
a value of vm_behavior_t

macroVM_BEHAVIOR_RSEQNTL

#define VM_BEHAVIOR_RSEQNTL ((vm_behavior_t) 3)
reverse sequential
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Reverse sequential order.
a value of vm_behavior_t

macroVM_BEHAVIOR_WILLNEED

The following "behaviors" affect the memory region only at the time of the call and are not stored in the VM map entry.
#define VM_BEHAVIOR_WILLNEED ((vm_behavior_t) 4)
will need in near future

macroVM_BEHAVIOR_DONTNEED

#define VM_BEHAVIOR_DONTNEED ((vm_behavior_t) 5)
dont need in near future

macroVM_BEHAVIOR_FREE

#define VM_BEHAVIOR_FREE ((vm_behavior_t) 6)
free memory without write-back

macroVM_BEHAVIOR_ZERO_WIRED_PAGES

#define VM_BEHAVIOR_ZERO_WIRED_PAGES ((vm_behavior_t) 7)
zero out the wired pages of an entry if it is being deleted without unwiring them first

macroVM_BEHAVIOR_REUSABLE

#define VM_BEHAVIOR_REUSABLE ((vm_behavior_t) 8)

macroVM_BEHAVIOR_REUSE

#define VM_BEHAVIOR_REUSE ((vm_behavior_t) 9)

macroVM_BEHAVIOR_CAN_REUSE

#define VM_BEHAVIOR_CAN_REUSE ((vm_behavior_t) 10)

macroVM_BEHAVIOR_PAGEOUT

#define VM_BEHAVIOR_PAGEOUT ((vm_behavior_t) 11)
force page-out of the pages in range (development only)

macroVM_BEHAVIOR_ZERO

#define VM_BEHAVIOR_ZERO ((vm_behavior_t) 12)
zero pages without faulting in additional pages

macroVM_BEHAVIOR_LAST_VALID

#define VM_BEHAVIOR_LAST_VALID (VM_BEHAVIOR_ZERO)