home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / bsd / 10990 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  1.2 KB

  1. Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!ai-lab!hal.gnu.ai.mit.edu!mycroft
  2. From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: Memory leak in kvm_getprocs() and top 3.0
  5. Message-ID: <1iglarINN9ou@life.ai.mit.edu>
  6. Date: 7 Jan 93 07:15:39 GMT
  7. References: <1ig4u5INNstu@life.ai.mit.edu>
  8. Organization: /etc/organization
  9. Lines: 24
  10. NNTP-Posting-Host: hal.gnu.ai.mit.edu
  11.  
  12.  
  13. Here is a patch, based on my previous diffs, to make the `RSS' field in
  14. top's display actually have some meaning.  The problem was caused by an
  15. odd quirk in the interaction between the kvm functions and the kernel.
  16.  
  17. -----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
  18. *** top-3.0/m_386bsd.c~    Thu Jan  7 01:51:42 1993
  19. --- top-3.0/m_386bsd.c    Thu Jan  7 02:02:12 1993
  20. ***************
  21. *** 383,388 ****
  22. --- 383,389 ----
  23.            (PP(pp, p_stat) == SRUN)) &&
  24.           (!show_uid || EP(pp, e_pcred.p_ruid) == (uid_t)sel->uid))
  25.           {
  26. +         (void)kvm_getu(pp);
  27.           *prefp++ = pp;
  28.           active_procs++;
  29.           }
  30. -----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
  31.  
  32. -- 
  33.  \  /   Charles Hannum, mycroft@ai.mit.edu
  34.  /\ \   PGP public key available on request.  MIME, AMS, NextMail accepted.
  35. Scheme  White heterosexual atheist male (WHAM) pride!
  36.