Use GPU to share data between two process

I want to share data between two process. One process write data to GPU while the other one read data written. I’ve written a simple demo one process cudaMalloc and write data , another process read data from the same address, but it failed.
I wonder if there is any way to achieve this? Thanks!

take a look at the CUDA simpleIPC sample code