c - mmap an address very unlikely to be used by any other part of the program -


for reason, want allocate block of memory mmap using fixed address, is, map_fixed. want use address unlikely used other part of program (heap, stack etc). such address range work 64 bit system?

linux attempt load elf executables @ address specified in executable, anywhere in 64-bit address space. unless give linker special options, however, build executables load @ low addresses (generally 0x0000000000400000), , use memory reasonable densely (there gaps between read-only , read-write sections), default heap coming afterwards.

linux uses addresses in range 0x00007fff00000000-0x00007fffffffffff stack , 0x00007f0000000000-0x00007ffeffffffff shared libraries. reserves 0x8000000000000000-0xffffffffffffffff kernel.

so means below 0x00007f0000000000 , above end of heap free, range 0x0000800000000000-0x7fffffffffffffff. likely, because allocations above defaults changeable if configure kernel or linker different.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -