I am testing mmap with the following code:
...
int memFd;
char *sharedMem;
memFd = open("/dev/mem", O_RDWR);
sharedMem = (unsigned int *) mmap(NULL, 0x10000000, PROT_READ | PROT_WRITE, MAP_SHARED, memFd, SHARD_MEM);
...
When I try to look up the 'sharedMem' or 'SHARD_MEM' address in gdb, I get the following error:
cannot access memory at address 0x********
After searching, I understood that it was impossible to view sharedMem.
What I'm curious about is:
User contributions licensed under CC BY-SA 3.0