Differences CudaMalloc vs Malloc

What is the difference between CudaMalloc and Malloc? Why would I use one over the other?

cudaMalloc allocates memory on the device, whereas malloc allocates on the host.

device meaning the GPU and host meaning CPU?

Sorry if my last post we not descriptive enough -

Does the device mean that it accesses the ram on the GPU and the host means that it accesses the ram controlled by the CPU?

So, Malloc will create a storage place in CPU controlled ram and cudaMalloc will create a storage place in GPU controlled ram?

Hi,

Yes that is correct.

Thanks