MAP_SHARED and RSS/SHR
Recently we were debugging a memory leak on an experimental debugging branch.
It turned out to be a false alarm due to adding tokio-console to a component to debug something.
However, while investigating we noticed a higher than expected RES / SHR reported by htop on another server, that was not on the tokio console branch.
We were using shared memory / mmap queues for communicating between two processes.
These mmaps are reported in RSS (resident set size) and also in SHR (shared memory).
jack.culhane.ie