Hello! Thank you for the great artcile!
I am trying to replace the standard allocation and transport with the zero copy allocation and transport in a project where i read my arrays in a C file and i accelerate one function in the gpu (cuda C file)  but i am facing 2 problems:
a) cudaHostAlloc((void **)&amp;h_in,  sizeIn,  cudaHostAllocMapped) is not supported in C file. This is why i cannot replace it with the first allocation of data (malloc).
b) if i use " cudaHostAlloc((void **)&amp;h_in,  sizeIn,  cudaHostAllocMapped) "  in a .cu file, the accesses in the data h_in (stored in Zero Copy Memory) are much slower than if h_in had declared with traditional malloc.

So  to use Zero Copy Memory transport  i  have to do an extra malloc (cudaHost () ) and an extra copy (copy the data that are traditionally allocated to the data stored in Zero Copy Memory ). 
Can i somehow avoid the extra allocations and transports? 

Thank you in advance!