Results 1 to 3 of 3
Dear all When linux load an elf executable, it will resolve all the libraries, but after the executable is finished, will those library it referenced be remove from the memory? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-16-2009 #1
- Join Date
- Jul 2009
When linux load an elf executable, it will resolve all the libraries, but after the executable is finished, will those library it referenced be remove from the memory?
- 07-16-2009 #2
Good Question, though I think your at the wrong forums.
I bet there is somebody here who knows it for sure. But if I recall correctly it unloads all librarys after the elfs execution. Though I ain't a 100% sure on that. To be sure I'd advice to check with Kernel Development Groups @ VGER.KERNEL.ORG
Hope that helps
- 07-17-2009 #3
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
AFAIK, the libraries are only unloaded if there are no other applications using them. The data segments will be unloaded as they are local to the process using them, but the text (code) pages will remain in memory until the last application using them terminates. Then, they might remain in cache so that if you start an application that uses those libraries in a short period of time, it won't need to read the code from disc, but can simply page it back into memory.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!