c++ - May a compiler ever generate code to unload parts of the code segment during execution? -


In addition to the Dell Concept which provides the ability to load / unloading methods or tasks in run-time, I am thinking that Can a compiler sometimes say something like this, okay because in this special part of the code, the code takes a considerable amount of space and during program execution it can never be used after this point, Some code to unload part It is good to generate code segment after reaching that particular point during the execution of the program so that the total area is smaller than the code code. Is it something imaginary or may it be?

What a compiler wants to do, that can be lengthy as it does not violate the standard If it can be detected that the code is never called, then it can be completely defective.

It can also change it with a small stub function which reloads the code, it is required.

But you will ever be able to see that the OS itself offers capability under cover.

The operating system (at least normal) your physical pages when the memory goes down, and they will not be reloaded until they are needed (usually a page accidentally access them While trying


Comments