cudaHostAlloc: Allocates page-locked memory on the host

Description Usage Arguments Value References See Also

Description

Allocates size bytes of host memory that is page-locked and accessible to the device. The driver tracks the virtual memory ranges allocated with this function and automatically accelerates calls to functions such as cudaMemcpy(). Since the memory can be accessed directly by the device, it can be read or written with much higher bandwidth than pageable memory obtained with functions such as malloc(). Allocating excessive amounts of pinned memory may degrade system performance, since it reduces the amount of memory available to the system for paging. As a result, this function is best used sparingly to allocate staging areas for data exchange between host and device.

Usage

1
cudaHostAlloc(size, flags)

Arguments

size

Requested allocation size in bytes

flags

Requested properties of allocated memory

Value

pHost

References

http://docs.nvidia.com/cuda/cuda-driver-api/index.html

See Also

cudaSetDeviceFlags cudaMallocHost cudaFreeHost


duncantl/RCUDA documentation built on May 15, 2019, 5:26 p.m.