top: get rid of on-stack variable buffers, use permanent one.

code shrank with and without TOPMEM:

top_main                                             828     844     +16
display_process_list                                1525    1473     -52
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 16/-52)            Total: -36 bytes

top_main                                            1150    1171     +21
display_topmem_process_list                         1150    1167     +17
display_process_list                                1525    1473     -52
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 38/-52)            Total: -14 bytes
This commit is contained in:
Denis Vlasenko
2007-09-08 17:34:05 +00:00
parent e7c1ad1540
commit 4c1d88daff
2 changed files with 25 additions and 21 deletions

View File

@ -54,6 +54,7 @@
# define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
# if __GNUC_PREREQ (3,0)
# define ALWAYS_INLINE __attribute__ ((always_inline)) inline
# define NOINLINE __attribute__((noinline))
# if !ENABLE_WERROR
# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
# define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result))