cuda.bindings._v2.driver.mem_free_v2#
- cuda.bindings._v2.driver.mem_free_v2(uint64_t dptr)#
Frees device memory.
Frees the memory space pointed to by
dptr, which must have been returned by a previous call to one of the following memory allocation APIs -cuMemAlloc(),cuMemAllocPitch(),mem_alloc_managed(),mem_alloc_async(),mem_alloc_from_pool_async(). Note - This API will not perform any implict synchronization when the pointer was allocated withcuMemAllocAsyncorcuMemAllocFromPoolAsync. Callers must ensure that all accesses to these pointer have completed before invokingcuMemFree. For best performance and memory reuse, users should usecuMemFreeAsyncto free memory allocated via the stream ordered memory allocator. For all other pointers, this API may perform implicit synchronization.- Parameters:
dptr (uint64_t) – Pointer to memory to free.
See also
cuMemFree_v2