From owner-freebsd-arch Tue Oct 29 20:39:49 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9AC237B401 for ; Tue, 29 Oct 2002 20:39:44 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20A3A43E75 for ; Tue, 29 Oct 2002 20:39:44 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 0FB60534E; Wed, 30 Oct 2002 05:39:42 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: arch@freebsd.org Subject: "MB" instead of "K bytes" in memory probe? From: Dag-Erling Smorgrav Date: Wed, 30 Oct 2002 05:39:41 +0100 Message-ID: Lines: 18 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386--freebsd) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-=-= The attached patch replaces the "K bytes" figure in the memory probe ("{real,avail} memory = XXX") with a MB figure. Before-and-after from /var/log/messages: Oct 21 22:44:21 dsa kernel: real memory = 266493952 (260248K bytes) Oct 21 22:44:21 dsa kernel: avail memory = 253214720 (247280K bytes) Oct 29 15:55:18 dsa kernel: real memory = 266493952 (254 MB) Oct 29 15:55:18 dsa kernel: avail memory = 251641856 (239 MB) Not a big thing, but I find the last two lines far easier to read than the first two. Any objections to committing this patch? DES -- Dag-Erling Smorgrav - des@ofug.org --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=memory.diff Index: sys/alpha/alpha/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/machdep.c,v retrieving revision 1.187 diff -u -r1.187 machdep.c --- sys/alpha/alpha/machdep.c 25 Oct 2002 19:10:55 -0000 1.187 +++ sys/alpha/alpha/machdep.c 29 Oct 2002 14:10:34 -0000 @@ -266,7 +266,8 @@ #ifdef PERFMON perfmon_init(); #endif - printf("real memory = %ld (%ldK bytes)\n", alpha_ptob(Maxmem), alpha_ptob(Maxmem) / 1024); + printf("real memory = %ld (%ld MB)\n", alpha_ptob(Maxmem), + alpha_ptob(Maxmem) / 1048576); /* * Display any holes after the first chunk of extended memory. @@ -285,8 +286,8 @@ vm_ksubmap_init(&kmi); - printf("avail memory = %ld (%ldK bytes)\n", ptoa(cnt.v_free_count), - ptoa(cnt.v_free_count) / 1024); + printf("avail memory = %ld (%ld MB)\n", ptoa(cnt.v_free_count), + ptoa(cnt.v_free_count) / 1048576); /* * Set up buffers, so they can be used to read disk labels. Index: sys/i386/i386/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v retrieving revision 1.545 diff -u -r1.545 machdep.c --- sys/i386/i386/machdep.c 25 Oct 2002 19:10:56 -0000 1.545 +++ sys/i386/i386/machdep.c 29 Oct 2002 14:11:05 -0000 @@ -236,8 +236,8 @@ #ifdef PERFMON perfmon_init(); #endif - printf("real memory = %u (%uK bytes)\n", ptoa(Maxmem), - ptoa(Maxmem) / 1024); + printf("real memory = %u (%u MB)\n", ptoa(Maxmem), + ptoa(Maxmem) / 1048576); /* * Display any holes after the first chunk of extended memory. */ @@ -257,8 +257,8 @@ vm_ksubmap_init(&kmi); - printf("avail memory = %u (%uK bytes)\n", ptoa(cnt.v_free_count), - ptoa(cnt.v_free_count) / 1024); + printf("avail memory = %u (%u MB)\n", ptoa(cnt.v_free_count), + ptoa(cnt.v_free_count) / 1048576); /* * Set up buffers, so they can be used to read disk labels. Index: sys/ia64/ia64/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/ia64/ia64/machdep.c,v retrieving revision 1.117 diff -u -r1.117 machdep.c --- sys/ia64/ia64/machdep.c 25 Oct 2002 19:10:56 -0000 1.117 +++ sys/ia64/ia64/machdep.c 29 Oct 2002 14:12:10 -0000 @@ -196,7 +196,8 @@ #ifdef PERFMON perfmon_init(); #endif - printf("real memory = %ld (%ldK bytes)\n", ia64_ptob(Maxmem), ia64_ptob(Maxmem) / 1024); + printf("real memory = %ld (%ld MB)\n", ia64_ptob(Maxmem), + ia64_ptob(Maxmem) / 1048576); /* * Display any holes after the first chunk of extended memory. @@ -215,8 +216,8 @@ vm_ksubmap_init(&kmi); - printf("avail memory = %ld (%ldK bytes)\n", ptoa(cnt.v_free_count), - ptoa(cnt.v_free_count) / 1024); + printf("avail memory = %ld (%ld MB)\n", ptoa(cnt.v_free_count), + ptoa(cnt.v_free_count) / 1048576); if (fpswa_interface == NULL) printf("Warning: no FPSWA package supplied\n"); Index: sys/pc98/i386/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/pc98/i386/machdep.c,v retrieving revision 1.300 diff -u -r1.300 machdep.c --- sys/pc98/i386/machdep.c 26 Oct 2002 15:44:06 -0000 1.300 +++ sys/pc98/i386/machdep.c 29 Oct 2002 14:14:41 -0000 @@ -256,8 +256,8 @@ #ifdef PERFMON perfmon_init(); #endif - printf("real memory = %u (%uK bytes)\n", ptoa(Maxmem), - ptoa(Maxmem) / 1024); + printf("real memory = %u (%u MB)\n", ptoa(Maxmem), + ptoa(Maxmem) / 1048576); /* * Display any holes after the first chunk of extended memory. */ @@ -277,8 +277,8 @@ vm_ksubmap_init(&kmi); - printf("avail memory = %u (%uK bytes)\n", ptoa(cnt.v_free_count), - ptoa(cnt.v_free_count) / 1024); + printf("avail memory = %u (%u MB)\n", ptoa(cnt.v_free_count), + ptoa(cnt.v_free_count) / 1048576); /* * Set up buffers, so they can be used to read disk labels. Index: sys/powerpc/powerpc/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/powerpc/powerpc/machdep.c,v retrieving revision 1.40 diff -u -r1.40 machdep.c --- sys/powerpc/powerpc/machdep.c 25 Oct 2002 19:10:57 -0000 1.40 +++ sys/powerpc/powerpc/machdep.c 29 Oct 2002 14:15:05 -0000 @@ -199,8 +199,8 @@ #ifdef PERFMON perfmon_init(); #endif - printf("real memory = %ld (%ldK bytes)\n", ptoa(Maxmem), - ptoa(Maxmem) / 1024); + printf("real memory = %ld (%ld MB)\n", ptoa(Maxmem), + ptoa(Maxmem) / 1048576); /* * Display any holes after the first chunk of extended memory. @@ -220,8 +220,8 @@ vm_ksubmap_init(&kmi); - printf("avail memory = %ld (%ldK bytes)\n", ptoa(cnt.v_free_count), - ptoa(cnt.v_free_count) / 1024); + printf("avail memory = %ld (%ld MB)\n", ptoa(cnt.v_free_count), + ptoa(cnt.v_free_count) / 1048576); /* * Set up buffers, so they can be used to read disk labels. --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message