mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-06 08:37:29 +02:00
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:
@@ -25,8 +25,8 @@
|
||||
#include "tlsf.h"
|
||||
#else
|
||||
/* Header containing the declaration of tlsf_poison_fill_pfunc_set()
|
||||
* used to register multi_heap_internal_poison_fill_region() as a
|
||||
* callback to fill memory region with given patterns in the heap
|
||||
* and tlsf_poison_check_pfunc_set() used to register callbacks to
|
||||
* fill and check memory region with given patterns in the heap
|
||||
* components.
|
||||
*/
|
||||
#include "rom/tlsf.h"
|
||||
@@ -361,6 +361,7 @@ multi_heap_handle_t multi_heap_register(void *start, size_t size)
|
||||
#endif
|
||||
#ifdef CONFIG_HEAP_TLSF_USE_ROM_IMPL
|
||||
tlsf_poison_fill_pfunc_set(multi_heap_internal_poison_fill_region);
|
||||
tlsf_poison_check_pfunc_set(multi_heap_internal_check_block_poisoning);
|
||||
#endif
|
||||
return multi_heap_register_impl(start, size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user