From: hedrick@dumas.rutgers.edu (Charles Hedrick) Subject: yet another try at free (free -b) Date: 3 Aug 1992 01:09:36 GMT
I've uploaded a new copy of ps-0.97.tar.Z to banjo. The creation date
of this version is shown by FTP as 3 Aug. The previous one was 1 or 2
Aug. Free -b now works. I had hoped to leave this for the real
maintainer of ps, since the code is messy, but because of questions
about performance it seemed worth getting it up quickly. There are
some problems. Because of dynamic allocation, I now have to traverse
the free list rather than simply going over an array as in the old
code. If things are going on in the kernel, it's possible for the
list to change out from under free. I try to catch this and warn you.
Unless this happens consistently (in which case I'll need to figure
out some other approach), just try again.
I've also noticed that there's almost no memory shown as free. I see
no signs of problems due to this. It could be that my .97 conversion
missed something. About all I can say is that the kernel variable
nr_free_pages shows the same number that the current code gets by
going through pages and looking for those that are not used. I
suspect the significance of "free" has changed in .97. It looks to me
like .97 is Linus' equivalent of SunOS 4.0. With that version, free
memory is also almost always zero, for what I suspect is a similar
reason. As with SunOS 4.0, the performance impact on small systems
may not be good.