Hacker News new | past | comments | ask | show | jobs | submit login

> malloc()ed memory is executable if you mprotect() it to be so.

True, but since mprotect() can only operate on full pages your mprotect() calls will most likely affect memory beyond what malloc gave you. For example if remove write or execute permissions your program will probably crash, and it's best to avoid having pages that are both writable and executable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: