cuda.bindings._v2.driver.mem_unmap#

cuda.bindings._v2.driver.mem_unmap(uint64_t ptr, size_t size)#

Unmap the backing memory of a given address range.

The range must be the entire contiguous address range that was mapped to. In other words, cuMemUnmap cannot unmap a sub-range of an address range mapped by cuMemCreate / cuMemMap. Any backing memory allocations will be freed if there are no existing mappings and there are no unreleased memory handles. When cuMemUnmap returns successfully the address range is converted to an address reservation and can be used for a future calls to cuMemMap. Any new mapping to this virtual address will need to have access granted through cuMemSetAccess, as all mappings start with no accessibility setup.

Parameters:
  • ptr (uint64_t) – Starting address for the virtual address range to unmap.

  • size (size_t) – Size of the virtual address range to unmap.

See also

cuMemUnmap