diff options
author | Maksym Planeta <mcsim.planeta@gmail.com> | 2012-10-08 16:01:13 +0200 |
---|---|---|
committer | Maksym Planeta <mcsim.planeta@gmail.com> | 2012-10-08 16:01:13 +0200 |
commit | fce4daf20cca97ada666b0a1e41c52d8387f265b (patch) | |
tree | 24f7e7f2ed5d2841ddbb6cc8f62df33a6dfaa5fe /vm/vm_map.h | |
parent | 6a08b518a60bd0e9448278f88f6f55681a5b9c6c (diff) |
Add IPC functions that allow user to manipulate with memory advice.
* include/mach/mach_types.defs (vm_advice_t): New type definition.
* include/mach/mach.defs (vm_advice): New RPC definition.
(memory_object_set_advice): Likewise.
(memory_object_get_advice): Likewise.
* kern/ipc_mig.c (syscall_vm_advice): New function. This is optimization
function for RPC that is processed by kernel.
* kern/syscall_sw.c (syscall_vm_advice): Add function prototype.
(mach_trap_table): Add syscall_vm_advice to trap table.
* vm/memory_object.c (memory_object_set_advice): New function. Sets memory
advice for memory object.
(memory_object_get_advice): New function. Returns memory advice of memory
object.
* vm/vm_user.c (vm_advice): New function. Wrapper for vm_map_advice.
* vm/vm_map.h (vm_map_advice): Add function prototype.
* vm/vm_map.c (vm_map_advice): New function. Sets memory advice for memory
range.
Diffstat (limited to 'vm/vm_map.h')
-rw-r--r-- | vm/vm_map.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vm/vm_map.h b/vm/vm_map.h index af7588ba..4b4520db 100644 --- a/vm/vm_map.h +++ b/vm/vm_map.h @@ -397,6 +397,9 @@ extern kern_return_t vm_map_protect(vm_map_t, vm_offset_t, vm_offset_t, /* Change inheritance */ extern kern_return_t vm_map_inherit(vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); +/* Change page fault policy */ +extern kern_return_t vm_map_advice(vm_map_t, vm_offset_t, vm_size_t, + vm_advice_t, vm_size_t); /* Debugging: print a map */ extern void vm_map_print(vm_map_t); |