My question is related to dynamic library loading ('abc.dll' or 'abc.so') on both Windows & Linux enviroments.
I have a dll or shared memory. And i am having two applications which have to use this dll (abc.dll or abc.so). Now i have placed a copy of this dll (abc.dll or abc.so) in their respective folder of executable :
/folder-one/app1.exe
/folder-one/abc.dll (resp. abc.so)
/folder-two/app2.exe
/folder-two/abc.dll (resp. abc.so)
Now when i run app1.exe it loads the abc-library (abc.dll or abc.so) from its folder-one & runs.
Now when i run app2.exe it loads the abc-library (abc.dll or abc.so) from its folder-two & runs.
Q-1 Now my question is that when both the application run, will there be be two copies of the dll loaded ?
Loader loads the shared library (abc.dll or abc.so) in the memory in both linux & windows enviroment. http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
Q-2 Is there a disadvantage to have the shared libraries (abc.dll or abc.so) as individual copies in the respective folders ?
Q-3 If i want to load a single dll from both applications, then what should be the common location (so both applications can find it)?
.so-file is a shared object not a shared memory... - umläute