Memory pinning and fortran 77 How could we pin memory without dynamic allocation ?

Hi all,

I’m not a real fortran programmer, so if anyone has a proper answer (or workaround) to that question, i’m interested in any suggestion.

Let’s consider some fortran 77 code, where i would like to get the benefit of memory pinning for an array. Since i can’t just change a malloc to a call to cudaMallocHost, and that there is still no way to tell CUDA to pin a given interval of memory, is there any way to use pinned memory here ?
If more “modern” fortran standards supports dynamic memory allocation, you certainly understand that compiling old code as if it was fortran 90 may be a problem/a pain for some “real codes”.

Of course, i'd be more than glad if future CUDA release get an API such as "cudaPin(void *addr, size_t len)". I do realize that there are extremelly complex issues (typically, this is a problem for codes where it is possible to remap the underlying buffer. Just like what networking people have been doing with RDMA / Infiniband etc., a "simple solution" could be to ignore those problems and to let the programmer handle them by hand.

Thanks for your time,