1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/print_stack_usage: update MIN_SIZE

Since fmt no longer has a significant advantage in stack consumption,
we need to bump the `MIN_SIZE` guard that prevents causing stack
overflows due to the printing of the stack consumption.
This commit is contained in:
Marian Buschsieweke 2022-11-15 21:41:58 +01:00
parent 35149bd1c2
commit 5b86848d77
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -26,12 +26,7 @@
#include <stdio.h>
#endif
#if MODULE_FMT
/* fmt's `print_str()` needs very little stack. ~200 total was fine on Cortex-M. */
# define MIN_SIZE (THREAD_STACKSIZE_TINY)
#else
# define MIN_SIZE (THREAD_STACKSIZE_TINY + THREAD_EXTRA_STACKSIZE_PRINTF)
#endif
void print_stack_usage_metric(const char *name, void *stack, unsigned max_size)
{