pub unsafe extern "C" fn CPLVirtualMemFileMapNew(
    fp: *mut VSILFILE,
    nOffset: vsi_l_offset,
    nLength: vsi_l_offset,
    eAccessMode: Type,
    pfnFreeUserData: CPLVirtualMemFreeUserData,
    pCbkUserData: *mut c_void
) -> *mut CPLVirtualMem
Expand description

Create a new virtual memory mapping from a file.

The file must be a “real” file recognized by the operating system, and not a VSI extended virtual file.

In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written in the file.

On Linux AMD64 platforms, the maximum value for nLength is 128 TB. On Linux x86 platforms, the maximum value for nLength is 2 GB.

Supported on Linux only in GDAL <= 2.0, and all POSIX systems supporting mmap() in GDAL >= 2.1

@param fp Virtual file handle. @param nOffset Offset in the file to start the mapping from. @param nLength Length of the portion of the file to map into memory. @param eAccessMode Permission to use for the virtual memory mapping. This must be consistent with how the file has been opened. @param pfnFreeUserData callback that is called when the object is destroyed. @param pCbkUserData user data passed to pfnFreeUserData. @return a virtual memory object that must be freed by CPLVirtualMemFree(), or NULL in case of failure.

@since GDAL 1.11