diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-03 16:06:42 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-03 16:06:42 +0200 |
commit | bc14f4d13d3cf1d43ae809d641e29174662cd1e4 (patch) | |
tree | 40e35ab386de9c16bf5a5539a405fa5a1fdedc2b | |
parent | 056e1f558cc8bc22f221b49bf4571aed59cdae09 (diff) | |
download | busybox-w32-bc14f4d13d3cf1d43ae809d641e29174662cd1e4.tar.gz busybox-w32-bc14f4d13d3cf1d43ae809d641e29174662cd1e4.tar.bz2 busybox-w32-bc14f4d13d3cf1d43ae809d641e29174662cd1e4.zip |
main(): add a TODO about finding a use for _end[] area
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/appletlib.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 4b5b09f45..d798a2eac 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -902,6 +902,19 @@ int lbb_main(char **argv) | |||
902 | int main(int argc UNUSED_PARAM, char **argv) | 902 | int main(int argc UNUSED_PARAM, char **argv) |
903 | #endif | 903 | #endif |
904 | { | 904 | { |
905 | #if 0 | ||
906 | /* TODO: find a use for a block of memory between end of .bss | ||
907 | * and end of page. For example, I'm getting "_end:0x812e698 2408 bytes" | ||
908 | * - more than 2k of wasted memory (in this particular build) | ||
909 | * *per each running process*! | ||
910 | * (If your linker does not generate "_end" name, weak attribute | ||
911 | * makes &_end == NULL, end_len == 0 here.) | ||
912 | */ | ||
913 | extern char _end[] __attribute__((weak)); | ||
914 | unsigned end_len = (-(int)_end) & 0xfff; | ||
915 | printf("_end:%p %u bytes\n", &_end, end_len); | ||
916 | #endif | ||
917 | |||
905 | /* Tweak malloc for reduced memory consumption */ | 918 | /* Tweak malloc for reduced memory consumption */ |
906 | #ifdef M_TRIM_THRESHOLD | 919 | #ifdef M_TRIM_THRESHOLD |
907 | /* M_TRIM_THRESHOLD is the maximum amount of freed top-most memory | 920 | /* M_TRIM_THRESHOLD is the maximum amount of freed top-most memory |