Function - Deallocate a region of virtual memory.
kern_return_t vm_deallocate (vm_task_t target_task, vm_address_t address, vm_size_t size);
The vm_deallocate function deallocates a region of virtual memory in the specified task's address space. The region starts at the beginning of the virtual page containing address and ends at the end of the virtual page containing address + size - 1. Because of this rounding to virtual page boundaries, the amount of memory deallocated may be greater than size. Use host_page_size to find the current virtual page size.
vm_deallocate affects only target_task. Other tasks that have access to the deallocated memory can continue to reference it.
vm_deallocate can be used to deallocate memory passed as out-of-line data in a message.
This interface is machine word length specific because of the virtual address parameter.
Functions: mach_msg, vm_allocate, vm_map, host_page_size.