Function - Synchronize the specified region of virtual memory.
kern_return_t vm_msync
(vm_task_t target_task,
vm_address_t address,
vm_size_t size,
target_task sync_flags);
The vm_msync function synchronizes the contents of a memory range with its backing store image by flushing or cleaning the contents of the specified range to the range's memory manager, engaging in a synchronization protocol with the manager (memory_object_synchronize). The client does not return from this call until the memory manager responds (to the kernel) with memory_object_synchronize_completed.
This interface is machine word length specific because of the virtual address parameter.
Functions: memory_object_synchronize, memory_object_synchronize_completed.