#include <oskit/svm/svm.h>int svm_dealloc(oskit_addr_t addr, oskit_size_t length);
Deallocate a range of memory that was previously allocated with svm_alloc. The range starts at addr, and is length bytes in size. The base address must be page aligned, and the length must be an integral number of pages. The range may be a subset of a previously allocated range; only that subset is deallocated.
- addr
- The address of the region to deallocate.
- length
- The size in bytes of the region to deallocate.
Returns zero on success. Returns OSKIT_E_INVALIDARG if either the base address or the size of the allocation is not page aligned, or if the range is not within an existing allocation.
svm_alloc, svm_protect