c++ - How do I mmap a _particular_ region in memory? -


i have program. want able mmap particular region of memory on different runs.

  1. i have source code of program. c/c++
  2. i control how program compiled. gcc
  3. i control how program linked. gcc
  4. i control how program run (linux).

i want have particular region of memory, 0xabcdabcd 0xdeadbeef mmap particular file. there anyway guarantee this? (i have somehow make sure other things aren't loaded particular region).

edit:

how make sure nothing else takes particular region in memory?

you cannot make sure nothing else takes area of memory - first come, first served. however, need particular part of memory, i'm guessing have pretty specialized environment, need make sure first (using start scripts)


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -