I think normally, you would allocate a single large (a multiple of page size) block for your code and manage the permissions on that using some wrapper functions.
Memory with rwx permissions is going back to the bad old days of self modifying code.
I think normally, you would allocate a single large (a multiple of page size) block for your code and manage the permissions on that using some wrapper functions.
Memory with rwx permissions is going back to the bad old days of self modifying code.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.