I'm trying to implement the solution suggested in this question
Is it possible to store pointers in shared memory without using offsets?
The proposed solution involves specifying a memory to 0x20000000000 to
void *shmat(int shmid, const void *shmaddr, int shmflg);
The problem is that this mapping may fail because its in use already. I want to know if this can be avoided by making sure 0x20000000000 is not used by
- kernel
- linker (i.e. .text/.bss etc. regions of executable)
This is what I found so far which isn't very satisfactory
How do I pass virtual address to shmat() function in a guaranteed way