cudaError_t cudaMalloc ( void **  devPtr,
size_t  size 

Allocates size bytes of linear memory on the device and returns in *devPtr a pointer to the allocated memory. The allocated memory is suitably aligned for any kind of variable. The memory is not cleared. cudaMalloc() returns cudaErrorMemoryAllocation in case of failure.

devPtr - Pointer to allocated device memory
size - Requested allocation size in bytes
cudaSuccess, cudaErrorMemoryAllocation
See also:
cudaMallocPitch, cudaFree, cudaMallocArray, cudaFreeArray, cudaMalloc3D, cudaMalloc3DArray, cudaMallocHost (C API), cudaFreeHost, cudaHostAlloc

Generated by Doxygen for NVIDIA CUDA Library  NVIDIA