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:
Peter Wemm 1996-06-29 08:04:05 +00:00
parent 66e36f2fac
commit 0cd02d20a1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16833

View File

@ -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);
}