esp-rom: create a patch of tlsf_check() for target(s) supporting ROM implementation of TLSF

The tlsf implementation in the ROM does not provide a mechanism
to register a callback to be called in by tlsf_check().

This commit is creating a patch of the tlsf implementation to provide
a definition of the function allowing to register the callback called
in tlsf_check() and add the call of this callback in tlsf_check().

This patch is only compiled for target(s) with ESP_ROM_HAS_HEAP_TLSF
set and ESP_ROM_TLSF_CHECK_PATCH set. For all the other configurations
the environment remains unchanged by those modifications.
This commit is contained in:
Guillaume Souchere
2022-08-12 11:28:16 +02:00
parent f051da86e2
commit b9abad7a89
6 changed files with 262 additions and 2 deletions
@@ -18,6 +18,15 @@ extern "C" {
*/
void tlsf_poison_fill_pfunc_set(void *pfunc);
/*!
* @brief Set the function to call for checking memory region when
* poisoning is configured.
*
* @param pfunc The callback function to trigger for checking
* the content of a memory region.
*/
void tlsf_poison_check_pfunc_set(void *pfunc);
#ifdef __cplusplus
}
#endif