Commit 6dbef339 authored by albert's avatar albert

fix 4 GB wrap-around in top

parent 28d744ee
procps-3.1.11 --> procps-3.1.12
top: fixed 4 GB wrap-around
ps: comes with tests
man page: /var/run/utmp, not /etc/utmp #206583
required flags moved out of CFLAGS #205429
RPM generation handles /lib64
WCHAN skips leading '.'
......
......@@ -240,8 +240,7 @@ will be destroyed by init(8) if the parent process exits.
PROCESS FLAGS
FORKNOEXEC 1 forked but didn't exec
SUPERPRIV 2 used super-user privileges
DUMPCORE 4 dumped core
SUPERPRIV 4 used super-user privileges
PROCESS STATE CODES
......
......@@ -71,7 +71,8 @@ static char Rc_name [OURPATHSZ];
static RCF_t Rc = DEF_RCFILE;
/* The run-time acquired page size */
static int Page_size;
static unsigned Page_size;
static unsigned page_to_kb_shift;
/* SMP, Irix/Solaris mode, Linux 2.5.xx support */
static int Cpu_tot,
......@@ -1567,6 +1568,11 @@ static void before (char *me)
/* get virtual page size -- nearing huge! */
Page_size = getpagesize();
i = Page_size;
while(i>1024){
i >>= 1;
page_to_kb_shift++;
}
}
......@@ -2874,6 +2880,8 @@ static proc_t **summary_show (void)
}
#define PAGES_2K(n) (unsigned)( (n) << page_to_kb_shift )
/*
* Display information for a single task row. */
static void task_show (const WIN_t *q, const proc_t *p)
......
......@@ -82,11 +82,6 @@
/* Yield table size as 'int' */
#define MAXTBL(t) (int)(sizeof(t) / sizeof(t[0]))
/* Convert some proc stuff into vaules we can actually use */
#define BYTES_2K(n) (unsigned)( (n) >> 10 )
#define PAGES_2B(n) (unsigned)( (n) * Page_size )
#define PAGES_2K(n) BYTES_2K(PAGES_2B(n))
/* Used as return arguments in *some* of the sort callbacks */
#define SORT_lt ( Frame_srtflg > 0 ? 1 : -1 )
#define SORT_gt ( Frame_srtflg > 0 ? -1 : 1 )
......
......@@ -60,7 +60,7 @@ Show information about the specified user only.
.SH FILES
.TP
.I /etc/utmp
.I /var/run/utmp
information about who is currently logged on
.TP
.I /proc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment