A method of reducing interference among applications co-located in a
process when using dynamic libraries is disclosed. For each dynamic
library, multiple instances of the dynamic library are loaded in the same
operating system process (or process), whereas each instance of the
dynamic library corresponds to one of the multiple applications
co-located in the same process. In particular, the text segments (or
read-only segments) of the instances of the dynamic library are mapped to
the same physical memory pages, leading to a low memory footprint.
Moreover, within the process, a co-located application's access to a
dynamic library is directed to the instance (of the dynamic library)
associated with the accessing application, reducing interference among
applications co-located in the same process.