pub unsafe extern "C" fn hipHostAlloc(
ptr: *mut *mut c_void,
size: usize,
flags: c_uint,
) -> hipError_tExpand description
@brief Allocate device accessible page locked host memory
@param[out] ptr Pointer to the allocated host pinned memory @param[in] size Requested memory size in bytes @param[in] flags Type of host memory allocation see below
If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.
Flags:
- #hipHostAllocDefault Default pinned memory allocation on the host.
- #hipHostAllocPortable Memory is considered allocated by all contexts.
- #hipHostAllocMapped Map the allocation into the address space for the current device.
- #hipHostAllocWriteCombined Allocates the memory as write-combined.
- #hipHostAllocUncached Allocate the host memory on extended fine grained access system memory pool
@return #hipSuccess, #hipErrorOutOfMemory, #hipErrorInvalidValue