cuda.bindings._v2.driver.mem_address_reserve#
- cuda.bindings._v2.driver.mem_address_reserve(
- size_t size,
- size_t alignment,
- uint64_t addr,
- unsigned long long flags,
Allocate an address range reservation.
Reserves a virtual address range based on the given parameters, giving the starting address of the range in
ptr. This API requires a system that supports UVA. The size and address parameters must be a multiple of the host page size and the alignment must be a power of two or zero for default alignment. Ifaddris 0, then the driver chooses the address at which to place the start of the reservation whereas when it is non-zero then the driver treats it as a hint about where to place the reservation.- Parameters:
size (size_t) – Size of the reserved virtual address range requested.
alignment (size_t) – Alignment of the reserved virtual address range requested.
addr (uint64_t) – Hint address for the start of the address range.
flags (unsigned long long) – Currently unused, must be zero.
- Returns:
- Resulting pointer to start of virtual address range
allocated.
- Return type:
uint64_t
See also
cuMemAddressReserve