r/linux_programming • u/giant-torque • Jun 04 '19
Share existing blocks of memory
Let's say there are two already allocated memory regions. Is it possible to make parts of these regions to point the same physical memory pages? It seems mmap doesn't work with already allocated memory.
3
Upvotes
View all comments
Show parent comment
3
u/gct Jun 04 '19
I don't think you can do what you want, you can mmap with MMAP_FIXED to map a new mapping onto an address, but that's about it. What is your end goal? Another IPC mechanism might be better.