cuda.bindings._v2.driver.mem_retain_allocation_handle#
- cuda.bindings._v2.driver.mem_retain_allocation_handle(intptr_t addr) uint64_t#
Given an address
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.- Parameters:
addr (intptr_t) – Memory address to query, that has been mapped previously.
- Returns:
CUDA Memory handle for the backing memory allocation.
- Return type:
uint64_t
Note
The address
addr, can be any address in a range previously mapped bycuMemMap, and not necessarily the start address.See also
cuMemRetainAllocationHandle