Shared libraries (.so files) on Linux are designed to save memory by sharing physical memory pages across processes via the kernel's Page Cache. But in practice, shared libraries often consume substantially more physical RAM than expected due to Copy-On-Write (COW) dirtying.
When a process writes to any page in a shared objectโor when the dynamic linker (ld.so) writes relocated pointers at startupโthat 4 KB page is duplicated in physical RAM as Private_Dirty memory. If a library has 5 MB of dirty pages and is loaded by 100 processes, that library silently costs 500 MB of unshareable RAM.
Here is a practical, command-line-driven playbook for identifying private dirty hotspots in shared objects and resolving them in source code.

