Messages in this thread | | | Subject | Is it a bug (about share memory)? | Date | Fri, 22 Aug 2003 16:15:18 +0800 | From | "Zheng, Jeff" <> |
| |
Hi,
I tried to use share memory to check vm overcommit by check Committed_AS in /proc/meminfo. It seems that attach of share momory will add the value of Committed_AS but detach of share memory does not reduce the value of Committed_AS. Below is the result (attached file is source of the command) [root@hpi overcommit_basic]# ./shm 5000000 m The value of Committed_AS is 100436 KB before attach The value of Committed_AS is 105384 KB After attach [root@hpi overcommit_basic]# ./shm 5000000 m The value of Committed_AS is 105520 KB before attach The value of Committed_AS is 105520 KB After attach [root@hpi overcommit_basic]# ./shm 5000000 n The value of Committed_AS is 105416 KB before attach The value of Committed_AS is 110364 KB After attach
the first parm is size of share memory, the second parm is proj of API ftok. When I allocate 5M, Committed_AS add 5M. The issue is: when I detach the share memory, and there is no other process attach to the share memory, Committed_AS does not reduce 5M.
Inactive of /proc/meminfo also changed.
My kernel is 2.5.70. And it seems that all kernel is the same.
Thanks Jeff Jeff.Zheng@intel.com BTW, I speak for myself, not for Intel Corp. [unhandled content-type:application/octet-stream] | |