Function cuMemRetainAllocationHandle

Source
pub unsafe extern "C" fn cuMemRetainAllocationHandle(
    handle: *mut CUmemGenericAllocationHandle,
    addr: *mut c_void,
) -> CUresult
Expand description

\brief Given an address \p addr, returns the allocation handle of the backing memory allocation.

The handle is guaranteed to be the same handle value used to map the memory. If the address requested is not mapped, the function will fail. The returned handle must be released with corresponding number of calls to ::cuMemRelease.

\note The address \p addr, can be any address in a range previously mapped by ::cuMemMap, and not necessarily the start address.

\param[out] handle CUDA Memory handle for the backing memory allocation. \param[in] addr Memory address to query, that has been mapped previously. \returns ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_PERMITTED, ::CUDA_ERROR_NOT_SUPPORTED

\sa ::cuMemCreate, ::cuMemRelease, ::cuMemMap