384
edits
Changes
→Memory Use Per Process
When you use a tool such as '''Process Monitor''' or '''top''', generally the memory amount being reported is '''Rss'''. So for simplicity’s sake, '''for this assignment the memory used by a process should be the resident total'''.
The total amount of Rss memory can be found in <code>/proc/pid</code>, where pid is the process id number. In this directory you will find a file called <code>smapsstatus</code>. Your program will need to read this file, find each line that begins with '''RssVmRSS''', and sum the number to get total Rss memory used. If no lines are found, return zero.
For more information on how memory and /proc in Linux refer to these manual pages:
<span id="restrictions"></span>
== Restrictions ==