由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - how to track page faults when allocation
相关主题
segmentation fault when using "script"关于CPU时间急问!
Re: how to track page faults when allocawhat's wrong with gcc?
[转载] 为什么会在调用malloc时Segmentation fault?Does perl support record/struct?
大侠帮忙看一下![转载] 活见鬼了---搞不定的程序
[转载] waitpid 一问Which library include gethostbyname?
core dumpSYSV shared memory question
SIGSEGV,Segmentation fault in Cygwinwhat wrong with these thread program. Thanks for helping
help for g77Socket programming help
相关话题的讨论汇总
话题: page话题: faults话题: allocation话题: reclaims话题: pi
进入Unix版参与讨论
1 (共1页)
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 { ...

1 (共1页)
进入Unix版参与讨论
相关主题
Socket programming help[转载] waitpid 一问
[转载] windows C++ -> Unix C++core dump
interview questionSIGSEGV,Segmentation fault in Cygwin
[转载] cxtermhelp for g77
segmentation fault when using "script"关于CPU时间急问!
Re: how to track page faults when allocawhat's wrong with gcc?
[转载] 为什么会在调用malloc时Segmentation fault?Does perl support record/struct?
大侠帮忙看一下![转载] 活见鬼了---搞不定的程序
相关话题的讨论汇总
话题: page话题: faults话题: allocation话题: reclaims话题: pi