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.
This commit is contained in:
Guillaume Souchere
2023-02-27 06:57:36 +01:00
parent e214989c58
commit 7e6f20218b

View File

@ -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 {