Pinned memory

If I allocate big amount of pinned memory (say 50-200GB, using cudaHostAlloc) am I assured that the memory will be contiguous in the RAM?


yes, its contiguous (assuming the allocation was successful) if it was performed by a single call to cudaHostAlloc

This is true for all allocators in CUDA, whether they are host allocators provided by standard libraries associated with the host operating system, or device allocators provided directly by CUDA

This statement is made from the viewpoint of the programmer’s perspective. I’m not referring to how data is organized on the other side of the page table. That is irrelevant for the programmer and for most programming purposes that I can think of.

Since these allocators all work on a single pointer, if the returned allocation were discontiguous, there would be no way to inform the code/caller of that.

Thanks a lot Robert!