I have two processes P1 and P2.
I run the P1 process and it creates a shared memory buffer of 1 Mb using mmap. I do not terminate the application (so the process still has the buffer) and get the virtual address of the buffer.
Now I run process P2, where I will use the virtual address of the shared memory buffer, and write some data to it (not sure if I will need to mmap it here). P2 will be terminated and P1 will be made to read data from that buffer and process it.
My current approach to this problem is to get the address from P1 and use it in P2 to write data into it. The code will be run on Linux PC.
My question is that is this possible to achieve?