So, I have an application which is VERY processor intensive. This application has a core which is general enough to work for all intended purposes. However, becuase of this generality, in certain situations it makes unnecessary intensive function calls. I could wrap these function calls in if cases with global variables to switch off those functions but I would rather not have the check at all (This code is being called billions of times). This point I dont want to argue. Therefore, Im trying to figure out how to copy the code into memory and then replace the call with a NOP. I've figured out how to copy the code into memory, and find the memory addresses right before and after the call. The problem comes in when I try to execute the code. I get a SEGFAULT. Any ideas?