g****t 发帖数: 39 | 1 Hi,
I am trying to track the memory usage, especially the page faults during
allocation. I found there is a getrusage() method, which tracks page faults
and page reclaims. My questions are as follows:
1. what does "page reclaims" mean? how to interpret it? Does that mean (a) if
a page Pi was used for Ni times without page faults, then ru_minflt = \sum {
Pi * Ni} ?
reference:
http://www.fifi.org/cgi-bin/man2html/usr/share/man/man2/getrusage.2.gz
struct rusage { ...
long ru_minfl | w**n 发帖数: 88 | 2 4G just means your system is a 32-bit addressing system (2^32 is maximum
integer you could get for memory size), the real limit is the
actual amount of memory (maybe + swap ) in your system
I don't know your motivation of tracking page fault, in most cases page
fault is handled in kernel concept without any signal triggered unless
the memory is ill addressed (SIGSEGV).if you want to handle SIGSEGV, just
write your own signal handler for the process.
【在 g****t 的大作中提到】 : Hi, : I am trying to track the memory usage, especially the page faults during : allocation. I found there is a getrusage() method, which tracks page faults : and page reclaims. My questions are as follows: : 1. what does "page reclaims" mean? how to interpret it? Does that mean (a) if : a page Pi was used for Ni times without page faults, then ru_minflt = \sum { : Pi * Ni} ? : reference: : http://www.fifi.org/cgi-bin/man2html/usr/share/man/man2/getrusage.2.gz : struct rusage { ...
|
|