Quote Originally Posted by uOpt View Post
Regular compiled code ("program data") is not moved to the swapfile at all. It is readonly mapped and if evicted to make space it is simply dropped from memory. If needed again it is fetched from the original place in the file. This applies to both exe files and dll files, plus any data that is mapped readonly, which is often the case for game data such as textures.

Swapspace is never involved here. This is another reason why swapping to SSDs is overrated. If you were to redirect the SSD money into more RAM you wouldn't have to worry about any of this.
This is still a form of "swapping". Now, if dropped out of memory, it still uses virtual address space, it will still generate a page fault and a reload. This is actually a scenario where a SSD shines because of the very small read latency, as this can happen even with swapping disabled (easily observed if one application is minimized for one day). I was however on the impression that some operating systems like UNIX for example keep also libraries swapped as it is possible to drop them out partially... must study more on subject...