How do you safely read memory on Unix (or at least Linux)?

I want to read the byte of memory, but I don’t know if the memory is really readable or not. You can do this on OS X using the vm_read function and on Windows using ReadProcessMemory or using _try / _catch. On Linux, I believe I can use ptrace, but only if it is not debugged.

FYI the reason why I want to do this is that I write a status code with an exception handler code, and it helps the user a lot if the user can see what different memory values ​​are, or for that matter, know if they were invalid.

+3
source share
1 answer

, / , . , .

/dev/proc// , , .

, , , , . , -, .

+1

All Articles