haiku/build
PulkoMandy 6711cd9e9e bootloader: reduce stack usage
On Sparc Openboot, we get allocated a stack of only 8 kilobytes, and
each called function costs at least 176 bytes for the stack frame.

This means we need to be more careful than usual about stack usage. Move
some large-ish allocations off the stack by either making them static,
or allocated dynamically.

Add a compiler flag to error on functions which use too much stack. The
threshold is at 1023 bytes, because that's what allowed me to find the
two functions that were causing a stack overflow (open_from and
_ParseActivatedPackagesFile)

Change-Id: Ia0d13a9247e1a3fff4ce654bdffd6edb16e7cbc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2371
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 20:23:01 +00:00
..
config_headers kernel/vm: fix several vm bugs in riscv64 2021-08-23 13:59:49 +00:00
jam bootloader: reduce stack usage 2021-10-22 20:23:01 +00:00
scripts build: Use $rmAttrs and $(RM) in more places instead of 'rm' directly. 2021-09-06 15:59:44 -04:00