Compile time decision...

I have two function foo_good and foo_critically_good. Both the function does conceptually the same thing. Meaning, the code (some fixes in critically_good function) and parameters passed are the same. Only difference is foo_good resides in part of memory that cannot be changed but foo_critically_good can be changed.

We have set of such functions, e.g foo1_good, foo2_good, foo3_good etc. foox_critically_good may not exits at all the time. Whenever we find problem with foox_good, we code foox_critically_good and wherever the code calls foox_good needs to be replaced by foox_critically_good. This case need to handled with individual functions.