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?
...
- 07-16-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 3
ELF relocation
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?
thanks
from Peter
- 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
Cheers,
Robin
- 07-17-2009 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,496
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!


Reply With Quote
