Updated: April 19, 2023 |
Unmap previously mapped addresses
#include <sys/mman.h> int munmap_device_memory( void * addr, size_t len );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The munmap_device_memory() function is essentially the same as munmap(). It removes any mappings for pages in the address range starting at addr and continuing for len bytes, rounded up to the next multiple of the page size. Subsequent references to these pages cause a SIGSEGV signal to be set on the process.
If there are no mappings in the specified address range, then munmap() has no effect.
This function is the complement of mmap_device_memory().
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |