[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vm_size_t is unsigned, so libps should use unsigned ints.
From: |
Marcus Brinkmann |
Subject: |
Re: vm_size_t is unsigned, so libps should use unsigned ints. |
Date: |
Mon, 27 May 2002 02:32:35 +0200 |
User-agent: |
Mutt/1.3.28i |
On Sun, May 26, 2002 at 04:04:44PM -0400, James A Morrison wrote:
> I had noticed that ps and pptop would show the virtual size of some of my
> processes to be some large negative number, which seems wrong, so here is the
> patch I use to get only positive number for the resident size and the virtual
> size.
This patch is partially wrong and not complete, please make a new patch which
fixes (at least :) the following points:
* Check what is up with all the other values using ps_emit_nice_int:
Some of them surely are candidates to be uints as well, but check
each one individually.
* Don't rename ps_emit_nice_int, but provide ps_emit_nice_uint as a new
function used by all from above. Seems we need a second sprint_frac_value
function for uint's, too. I say maybe because the analysis above might
lead to a result where all types are either uint, or are int but without any
valid negative numbers. If the latter is the case, an assert() and a cast
to uint will do.
* Your changelog doesn't match the patch. If you rename a function, you
should do:
(foo_old): Renamed to ...
(foo_new): ... this. New function.
Or something like that. But see above, probably should not be renamed at all.
Thanks for spotting this,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann GNU http://www.gnu.org marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de