C++ memory protect pointers <p>Is it possible to "memory protect" pointers so that it's actually impossible to change them in the code, so that attempting to change them in the code results in a bus error? I am not referring to <code>const</code> but some type of deeper immutability assurance on the OS level. The question applies to any OS.</p> <p>(Carmack mentions something like that here: <a href="https://youtu.be/Uooh0Y9fC_M?t=1h41m" rel="nofollow">https://youtu.be/Uooh0Y9fC_M?t=1h41m</a>)</p>