I have a program. I want it to be able to mmap a particular region of memory over different runs.
- I have the source code of the program. C/C++
- I control how the program is compiled. gcc
- I control how the program is linked. gcc
- I control how the program is run (Linux).
I just want to have this particular region of memory, say 0xabcdabcd to 0xdeadbeef that I mmap to a particular file. Is there anyway to guarantee this? (I have to somehow make sure that other things aren't loaded into this particular region).
EDIT:
How do I make sure that nothing else takes this particular region in memory?