When mlock() is not supported.
I started to develop an own solution to protect the memory of processes against manipulation and other memory problems or attacks. It may be a lame question, but I am not a Kernel expert: if mlock() is not supported, (so _POSIX_MEMORY_PROTECTION or _POSIX_MEMLOCK_RANGE not defined) how can I implement this service? Can I simply copy the content of "mlock.c" from the Kernel's source, and It will work on other systems? Because portability is very important. Thank you!