feat(esp_rom): patch heap walker to the ROM implementation

modify existing patch of TLSF rom and add multi heap patch
to add the walker feature to the ROM implementation of the
heap component.
This commit is contained in:
Guillaume Souchere
2024-03-19 13:56:32 +01:00
parent 34fb83ffbc
commit 39f789df93
13 changed files with 88 additions and 108 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -20,10 +20,13 @@ typedef struct multi_heap_info *multi_heap_handle_t;
*
* @param block_ptr Pointer to the block data
* @param block_size The size of the block
* @param block_used Block status. True if free, false if used
* @param block_used Block status. 0: free, 1: allocated
* @param user_data Opaque pointer to user defined data
*
* @return True if the walker is expected to continue the heap traversal
* False if the walker is expected to stop the traversal of the heap
*/
typedef void (*multi_heap_walker_cb_t)(void *block_ptr, size_t block_size, int block_used, void *user_data);
typedef bool (*multi_heap_walker_cb_t)(void *block_ptr, size_t block_size, int block_used, void *user_data);
/**
* @brief Call the tlsf_walk_pool function of the heap given as parameter with