Discarding Data
The virtual memory manager interface discards data using the vm_release and vm_releasep services.
The pages specified by a data range can be released from the underlying virtual memory object by calling the vm_release service. The virtual memory manager deallocates any associated paging space slots. A subsequent reference to data in the range results in a page fault.
A virtual memory data provider can release a specified range of pages in a virtual memory object by calling the vm_releasep service. The virtual memory object need not be addressable for this call.