Assume a executable foo.exe is built based on static libraries and 6 instances of this foo.exe are running at the same time on the a machine. Since all the code is same (read only part) except for the read write part on the RAM, will there be any sharing amongst these 6 instances in the RAM to improve performance ?
I do know that if the above foo.exe uses shared libraries instead ,even though there are 6 instances running only 1 instance of these shared libraries will be in the RAM.