From 7e6f20218b2ac40ebb82f7a835d6ab3c8ba220ff Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Mon, 27 Feb 2023 06:57:36 +0100 Subject: [PATCH] heap: Fix call to substract_poison_overhead() in IRAM function When release sdkconfig is set, substract_poison_overhead() is not inlined and called from IRAM in multi_heap_get_allocated_size(). By wlways inlining substract_poison_overhead(), we assure that this problem will not happen. --- components/heap/multi_heap_poisoning.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/heap/multi_heap_poisoning.c b/components/heap/multi_heap_poisoning.c index b80ed503f3..9f0ca9dd8d 100644 --- a/components/heap/multi_heap_poisoning.c +++ b/components/heap/multi_heap_poisoning.c @@ -349,7 +349,7 @@ multi_heap_handle_t multi_heap_register(void *start, size_t size) return multi_heap_register_impl(start, size); } -static inline void subtract_poison_overhead(size_t *arg) { +static inline __attribute__((always_inline)) void subtract_poison_overhead(size_t *arg) { if (*arg > POISON_OVERHEAD) { *arg -= POISON_OVERHEAD; } else {