next up previous contents index
Next: 17.2.4 svm_protect: control the Up: 17.2 API reference Previous: 17.2.2 svm_alloc: allocate a

17.2.3 svm_dealloc: deallocate a region of virtual memory

 

SYNOPSIS

#include <oskit/svm/svm.h>

int svm_dealloc(oskit_addr_t addr, oskit_size_t length);

DESCRIPTION

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.

PARAMETERS

addr
The address of the region to deallocate.
length
The size in bytes of the region to deallocate.

RETURNS

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.

RELATED INFORMATION

svm_alloc, svm_protect



University of Utah Flux Research Group