Skip to main content

map_memory

Function map_memory 

Source
pub unsafe fn map_memory(
    device: &Device,
    memory: DeviceMemory,
    offset: DeviceSize,
    size: DeviceSize,
    flags: MemoryMapFlags,
) -> Result<*mut c_void, CallError>
Expand description

Map a range of a device memory object into host address space.

Returns a raw pointer to the start of the mapped range.

ยงSafety

memory must be host-visible, not already mapped, and remain live until Device::unmap_memory is called.