From 3ca5a4b299c3140f8a993225944468ca887d4b9a Mon Sep 17 00:00:00 2001 From: asmodai Date: Mon, 8 Apr 2002 10:39:12 +0000 Subject: Change totreq to uint64_t from a long (the PR has an int64_t, which didn't make sense to me) and change the printf argument from %8ld to %20llu to accompany the printing of the totals. Realigned the header printed above it as well. PR: 32342 Submitted by: ryan beasley Reviewed by: jeff, Tim J Robbins --- usr.bin/vmstat/vmstat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index b792ac6..1a15b75 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -761,7 +761,8 @@ domem() struct malloc_type *ks; int i, j; int first, nkms; - long totuse = 0, totfree = 0, totreq = 0; + long totuse = 0, totfree = 0; + uint64_t totreq = 0; struct malloc_type kmemstats[MAX_KMSTATS], *kmsp; char buf[1024]; @@ -810,8 +811,8 @@ domem() totuse += ks->ks_memuse; totreq += ks->ks_calls; } - (void)printf("\nMemory Totals: In Use Free Requests\n"); - (void)printf(" %7ldK %6ldK %8ld\n", + (void)printf("\nMemory Totals: In Use Free Requests\n"); + (void)printf(" %7ldK %6ldK %20llu\n", (totuse + 1023) / 1024, (totfree + 1023) / 1024, totreq); } -- cgit v1.1