[PATCH] top: parse /proc/meminfo differently, save 114 bytes

gotrunks at gmail.com gotrunks at gmail.com
Tue Jul 26 19:22:26 UTC 2011


Hi,

This patch makes top parse /proc/meminfo differently, reducing the
code only used in old kernels (<2.6). Should not break compatibility
(Linux 2.2 and 2.4 tested).

$ make bloatcheck
function                                             old     new   delta
.rodata                                           148282  148253     -29
display_header                                      1065     980     -85
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-114)           Total: -114 bytes
   text	   data	    bss	    dec	    hex	filename
 931375	   4146	   9552	 945073	  e6bb1	busybox_old
 931261	   4146	   9552	 944959	  e6b3f	busybox_unstripped


Regards,
--
Pere
-------------- next part --------------
A non-text attachment was scrubbed...
Name: top.c
Type: text/x-csrc
Size: 31689 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20110726/9d7ecddc/attachment-0001.c>


More information about the busybox mailing list