Skip to content

Commit

Permalink
sys/print_stack_usage: update MIN_SIZE
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 5b86848)
  • Loading branch information
maribu committed Nov 17, 2022
1 parent d9da5aa commit 7b54a45
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions sys/test_utils/print_stack_usage/print_stack_usage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 7b54a45

Please sign in to comment.