Is there a better way than parsing /proc/self/maps to figure out memory protection?
I do not know an equivalent of VirtualQuery on Linux. But some other ways to do it which may or may not work are: you setup a signal handler trapping SIGBUS/SIGSEGV and go ahead with your read or write. If the memory is protected, your signal trapping code will be called. If not your signal … Read more