aboutsummaryrefslogtreecommitdiff
path: root/procps/free.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* free: bloat reductionRon Yorston2024-04-181-1/+1
| | | | | | | Allow the compiler to inline parse_meminfo() so it can spot some optimisations. Saves 208-240 bytes.
* Merge branch 'busybox' into mergeRon Yorston2023-07-131-1/+1
|\
| * Update applet size estimatesDenys Vlasenko2023-07-101-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Remove "select PLATFORM_LINUX"Denys Vlasenko2022-11-291-1/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix non-Linux buildsSamuel Thibault2022-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | Various tools are Linuxish and should thus only attempted to build on Linux only. Some features are also Linux-only. Also, libresolv is used on all GNU platforms, notably GNU/Hurd and GNU/kfreeBSD. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-06-281-35/+51
|\|
| * free: implement -hDenys Vlasenko2021-06-181-29/+51
| | | | | | | | | | | | | | | | | | | | | | function old new delta .rodata 103331 103363 +32 packed_usage 33652 33654 +2 free_main 657 588 -69 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 34/-69) Total: -35 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: --help tweaksDenys Vlasenko2021-06-141-1/+1
| | | | | | | | | | | | | | function old new delta packed_usage 33589 33552 -37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | free: implement sysinfo(2) and enable free(1)Ron Yorston2021-02-181-0/+15
|/ | | | | | | | | | | | | This is an experimental implementation of sysinfo(2)/free(1). It uses the WIN32 API GlobalMemoryStatusEx() to obtain information about memory. It seems that the 'total pagefile' value includes total RAM as well as pagefile and 'available pagefile' includes available RAM. So the RAM values are deducted. I've no idea what corresponds to Linux buffers and cache.
* free: code shrinkDenys Vlasenko2020-11-271-4/+12
| | | | | | | function old new delta free_main 664 657 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: drop PLATFORM_LINUXRon Yorston2020-08-131-1/+0
| | | | | | | | | | | | | | | PLATFORM_LINUX is a hidden configuration option which is disabled by default and enabled at over a hundred locations for features that are deemed to be Linux specific. The only effect of PLATFORM_LINUX is to control compilation of libbb/match_fstype.c. This file is only needed by mount and umount. Remove all references to PLATFORM_LINUX and compile match_fstype.c if mount or umount is enabled. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: include SReclaimable in cached valueLukas Rusak2019-06-251-13/+17
| | | | | | | | | | | | | | | | I noticed that the 'used' values from busybox free and procps-ng free differed so I looked into why. It turns out that procps-ng uses the "SReclaimable" value as part of the cached value. This was changed in procps-ng commit 05d751c4f076a2f0118b914c5e51cfbb4762ad8e function old new delta free_main 633 653 +20 Signed-off-by: Lukas Rusak <lorusak@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: update size informationDenys Vlasenko2018-12-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: ensure there is a least one space between numbersDenys Vlasenko2018-11-271-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: add 'available' memory if provided by the kernelGuillermo Rodriguez2018-10-301-23/+36
| | | | | | | | | | | | | | | | Show estimated available memory if this is provided by the kernel. See [1] for the full story. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 function old new delta free_main 537 633 +96 parse_cached_kb 85 - -85 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 96/-85) Total: 11 bytes Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: no longer include common_bufsiz.hDenys Vlasenko2017-10-051-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: make it NOFORKDenys Vlasenko2017-10-051-28/+23
| | | | | | | | | | function old new delta parse_cached_kb - 85 +85 free_main 580 537 -43 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 85/-43) Total: 42 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free,stat: make NOEXECDenys Vlasenko2017-08-071-2/+5
| | | | | | pkill/pgrep/pidof uncovered another quirk: what about noexec's _process names_? Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-3/+3
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Convert all procps/* applets to "new style" applet definitionsDenys Vlasenko2016-11-231-1/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add most of the required setup_common_bufsiz() callsDenys Vlasenko2016-04-211-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: handle "cached" value tooGuillermo Rodriguez2015-01-051-31/+46
| | | | | | | | function old new delta free_main 356 481 +125 Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: work around sysinfo.h versus linux/*.h problemsDenys Vlasenko2011-07-261-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hPere Orga2011-04-111-0/+12
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove a few aliasing warningsDenys Vlasenko2011-01-161-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: add -b/k/m/g options; remove 4 TB limitation. +100 bytesDenys Vlasenko2010-10-011-42/+56
| | | | | | Based on patch by Stefan Tomanek (stefan@pico.ruhr.de) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: more compatible output. +16 bytes. Closes bug 2383.Denys Vlasenko2010-08-121-8/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: silence warning about unused argvBernhard Reutner-Fischer2010-02-261-1/+1
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free: code shrinkDenys Vlasenko2010-02-211-35/+48
| | | | | | | function old new delta free_main 330 302 -28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Replace __uClinux__ define with !BB_MMUDenys Vlasenko2010-02-211-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove some uses of argcDenys Vlasenko2010-01-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | function old new delta whoami_main 34 37 +3 logname_main 60 63 +3 hostid_main 35 38 +3 ttysize_main 136 135 -1 nmeter_main 673 672 -1 logger_main 387 386 -1 uuencode_main 330 328 -2 ifupdown_main 2125 2123 -2 mesg_main 158 155 -3 free_main 333 330 -3 cal_main 902 899 -3 acpid_main 443 440 -3 ar_main 196 189 -7 find_main 476 467 -9 ifconfig_main 1235 1221 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/12 up/down: 9/-49) Total: -40 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* random style fixes (extra spaces deleted)Denis Vlasenko2007-03-241-4/+3
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* Change license statements (and clean up headers) on some of the files thatRob Landley2006-09-221-4/+1
| | | | Erik or I are primary copyright holders on.
* - move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer2006-06-021-15/+2
| | | | and eventual platform specific includes in early.
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-1/+1
| | | | definitions. (That should only be on prototypes.)
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-4/+4
|
* Update a bunch of docs. Run a script to update my email addr.Eric Andersen2003-07-141-2/+1
|
* Major coreutils update.Manuel Novoa III2003-03-191-1/+1
|
* Patch from Daniel J Walsh at redhat to make free work for systemsEric Andersen2003-01-111-10/+26
| | | | with more than 1 GB of memory...
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-2/+2
| | | | -Erik
* Added some more '/* getopt not needed */' lines.Mark Whitley2001-03-091-0/+2
|
* It turns out that DODMALLOC was broken when I reorganized busybox.hEric Andersen2001-02-201-1/+1
| | | | | | header file usage before the 0.49 release. To fix it, I had to move the '#include "busybox.h"' to the end of the list of #include files. -Erik
* This patch, put together by Manuel Novoa III, is a merge of workEric Andersen2001-02-141-1/+1
| | | | | | done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
* Fix up copyright msgs. Bump version to 0.49 in preparation for0_49Eric Andersen2001-01-271-1/+1
| | | | | a release. Update the website with release details. -Erik