Kyohei Kadota <lu...@lufia.org> once said:
> I'm reading proc(3). It describes the status file:
> 
> > the amount of memory used by the process, except its stack, in units of 
> > 1024 bytes
> 
> In /sys/src/9/pc/port/proc.c, it seems to me that procread sums all
> segment's size for that.
> Is the above statement correct?

The Labs kernel loops over [1,NSEG) to sum the segment sizes.
The index of the stack segment, SSEG, is zero so it is skipped.
This measurement is the total virtual address space in use by
the process minus the stack.

The 9front kernel loops over [0,NSEG) to scan the virtual page
table of each segment for used pages, summing as it goes. This
measurement is the total amount of memory in use by the process.

Cheers,
  Anthony

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tc2c9fe27a3a2dd4c-M9bf220c6eb9f6bf0e10d813e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to