I am creating a class and linking it to a shared library. The class has a static map variable. (in the class scope not global).
My question is, if multiple processes access the shared library, will they get the same copy of map (since it is static) or will they have different copies?
Will modification of the map in one process gets reflected in other processes which use the shared library also?
I am usiing the lib for a single process. I tried using lib for 2 processes by running them concurrently. As said by you, they had different copies of static map. Thank you for your information.
But i could not understand the mechanism. Can you explain what happens in this case? I heard that shared library is only loaded once even if multiple processes gets created.