mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Fix (I think) the %MEM count in 'ps -u'. It was bogusly taking the
vm_rssize (in pages, not bytes), then dividing (bogusly) by the page size, then using that as a fraction of the total pages.
This commit is contained in:
parent
66e36f2fac
commit
0cd02d20a1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16833
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: print.c,v 1.12 1996/05/02 08:37:16 phk Exp $
|
||||
* $Id: print.c,v 1.13 1996/05/02 13:06:21 phk Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -575,7 +575,7 @@ getpmem(k)
|
||||
/* XXX want pmap ptpages, segtab, etc. (per architecture) */
|
||||
szptudot = UPAGES;
|
||||
/* XXX don't have info about shared */
|
||||
fracmem = ((float)e->e_vm.vm_rssize + szptudot)/getpagesize()/mempages;
|
||||
fracmem = ((float)e->e_vm.vm_rssize + szptudot)/mempages;
|
||||
#endif
|
||||
return (100.0 * fracmem);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user