mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
feat(heap): update hash map to use singly linked list
Previously, the hash map was a doubly linked list but was never using the characteristics of it. This commit switches the hash map to a singly linked list instead This commit also fixes memory leak in heap trace tests by setting hashmap size to 10 for the tests (instead of the default value of 250) See https://github.com/espressif/esp-idf/issues/11173
This commit is contained in:
@@ -39,7 +39,7 @@ typedef struct heap_trace_record_t {
|
||||
#if CONFIG_HEAP_TRACING_STANDALONE
|
||||
TAILQ_ENTRY(heap_trace_record_t) tailq_list; ///< Linked list: prev & next records
|
||||
#if CONFIG_HEAP_TRACE_HASH_MAP
|
||||
TAILQ_ENTRY(heap_trace_record_t) tailq_hashmap; ///< Linked list: prev & next in hashmap entry list
|
||||
SLIST_ENTRY(heap_trace_record_t) slist_hashmap; ///< Linked list: next in hashmap entry list
|
||||
#endif // CONFIG_HEAP_TRACE_HASH_MAP
|
||||
#endif // CONFIG_HEAP_TRACING_STANDALONE
|
||||
} heap_trace_record_t;
|
||||
|
Reference in New Issue
Block a user