heap: add check for usage of flash content from iram

this commits:
- adds build-time test to check that no call to flash regions are done from IRAM functions

- resolves problems related to IRAM function using content in flash memory

- update heap_caps_alloc_failed to use a default function name in DRAM
  when necessary instead of creating a function name variable in DRAM for
  each call of heap_caps_alloc_failed. This allows to save some extra bytes
  in RAM.
This commit is contained in:
Guillaume Souchere
2022-11-04 15:48:09 +01:00
committed by BOT
parent 5f735a22ec
commit 598e77e287
5 changed files with 26 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ extern SLIST_HEAD(registered_heap_ll, heap_t_) registered_heaps;
bool heap_caps_match(const heap_t *heap, uint32_t caps);
/* return all possible capabilities (across all priorities) for a given heap */
inline static uint32_t get_all_caps(const heap_t *heap)
inline static __attribute__((always_inline)) uint32_t get_all_caps(const heap_t *heap)
{
if (heap->heap == NULL) {
return 0;