Pageable to Pinned memory

I am looking to check if if I have correctly allocated the data in Pinned memory. Is there a way to check if an array, for example, has been allocated in the Pinned memory?

you can instrospect the pointer

1 Like

Thank you, I attempted the following:

cudaError_t status = cudaMallocHost((void**)&index, nbe * sizeof(int));
if (status != cudaSuccess)
printf(“Error allocating pinned host memory\n”);
__ host __ cudaError_t cudaPointerGetAttributes ( cudaPointerAttributes* attributes, const void* index );

How do I print the memory type?