mirror of
https://github.com/sheumann/hush.git
synced 2025-01-10 16:29:44 +00:00
main(): add a TODO about finding a use for _end[] area
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
056e1f558c
commit
bc14f4d13d
@ -902,6 +902,19 @@ int lbb_main(char **argv)
|
|||||||
int main(int argc UNUSED_PARAM, char **argv)
|
int main(int argc UNUSED_PARAM, char **argv)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
/* TODO: find a use for a block of memory between end of .bss
|
||||||
|
* and end of page. For example, I'm getting "_end:0x812e698 2408 bytes"
|
||||||
|
* - more than 2k of wasted memory (in this particular build)
|
||||||
|
* *per each running process*!
|
||||||
|
* (If your linker does not generate "_end" name, weak attribute
|
||||||
|
* makes &_end == NULL, end_len == 0 here.)
|
||||||
|
*/
|
||||||
|
extern char _end[] __attribute__((weak));
|
||||||
|
unsigned end_len = (-(int)_end) & 0xfff;
|
||||||
|
printf("_end:%p %u bytes\n", &_end, end_len);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Tweak malloc for reduced memory consumption */
|
/* Tweak malloc for reduced memory consumption */
|
||||||
#ifdef M_TRIM_THRESHOLD
|
#ifdef M_TRIM_THRESHOLD
|
||||||
/* M_TRIM_THRESHOLD is the maximum amount of freed top-most memory
|
/* M_TRIM_THRESHOLD is the maximum amount of freed top-most memory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user