Hi,
I understand that shared libraries(.so) are loaded once and reused by the processes that are loaded subsequently, thus eliminating the need to load the same library to memory each time a program runs.
However, so far I haven't found any source that actually verifies this for FreeBSD.
My understanding of the process is that rtld searches the .hints file produced by ldconfig to look for the required libraries. However, no where could I find whether rtld looks for a memory cached version of the library using some sort of mapping structure before reloading the .so.
The question is: if two processes use libTest.so, what is the maximum number of copies of libTest.so that will exist in memory at any point given the following sequence?
Process 1 is loaded
Process 1 requests an object in libTest.so, rtld loads libTest.so to memory
Process 2 is loaded
Process 2 requests an object in libTest.so, WHAT DOES RTLD DO?
-the design and implementation of the FreeBSD OS p.62 describes shared libraries in a process but my question was not answered
thanks
I understand that shared libraries(.so) are loaded once and reused by the processes that are loaded subsequently, thus eliminating the need to load the same library to memory each time a program runs.
However, so far I haven't found any source that actually verifies this for FreeBSD.
My understanding of the process is that rtld searches the .hints file produced by ldconfig to look for the required libraries. However, no where could I find whether rtld looks for a memory cached version of the library using some sort of mapping structure before reloading the .so.
The question is: if two processes use libTest.so, what is the maximum number of copies of libTest.so that will exist in memory at any point given the following sequence?
Process 1 is loaded
Process 1 requests an object in libTest.so, rtld loads libTest.so to memory
Process 2 is loaded
Process 2 requests an object in libTest.so, WHAT DOES RTLD DO?
-the design and implementation of the FreeBSD OS p.62 describes shared libraries in a process but my question was not answered
thanks