Function gdal_sys::CPLVirtualMemPin
[−]
[src]
pub unsafe extern "C" fn CPLVirtualMemPin(
ctxt: *mut CPLVirtualMem,
pAddr: *mut c_void,
nSize: usize,
bWriteOp: c_int
)
Make sure that a region of virtual memory will be realized.
Calling this function is not required, but might be usefull when debugging a process with tools like gdb or valgrind that do not naturally like segmentation fault signals.
It is also needed when wanting to provide part of virtual memory mapping to a system call such as read() or write(). If read() or write() is called on a memory region not yet realized, the call will fail with EFAULT.
@param ctxt context returned by CPLVirtualMemNew(). @param pAddr the memory region to pin. @param nSize the size of the memory region. @param bWriteOp set to TRUE if the memory are will be accessed in write mode.
@since GDAL 2.0