How to find shared / copied memory pages in forked processes in C

I have a linux server process that loads large resources at startup. These processes will work on demand. The resources loaded at startup are the largest and will not change at run time. Peopleed child processes use read / write control structures to process requests for persistent resources.

How to find out how much memory is distributed between processes and how many of them are uinque for each process? Or which pages are duplicated due to write access from any of the processes?

+5
source share
1 answer

/proc/$pid/pagemap /proc/kpagecount /proc/kpageflags proc. root, , . Documentation/vm/pagemap.txt .

+5

All Articles