Content deleted Content added
m →Usage: pointed "Apple II" wikilink to "Apple II series" -- (disambiguation); pointed "Parameter" wikilink to "Parameter (computer programming)" article -- (disambiguation) |
m →Disadvantages: formatting fix |
||
Line 182:
Self-modifying code is harder to read and maintain because the instructions in the source program listing are not necessarily the instructions that will be executed. Self-modification that consists of substitution of [[function pointer]]s might not be as cryptic, if it is clear that the names of functions to be called are placeholders for functions to be identified later.
Self-modifying code can be rewritten as code that tests a [[flag (
Self-modifying code conflicts with authentication of the code and may require exceptions to policies requiring that all code running on a system be signed.
Line 188:
Modified code must be stored separately from its original form, conflicting with memory management solutions that normally discard the code in RAM and reload it from the executable file as needed.
On modern processors with an [[instruction pipelining|instruction pipeline]], code that modifies itself frequently may run more slowly, if it modifies instructions that the processor has already read from memory into the pipeline.
Self-modifying code cannot be used at all in some environments, such as the following:
|