/hal_espressif-latest/components/heap/include/ |
D | multi_heap.h | 11 /* multi_heap is a heap implementation for handling multiple 14 Any contiguous block of memory can be registered as a heap. 21 /** @brief Opaque handle to a registered heap */ 27 * @param heap Handle to a registered heap. 33 void *multi_heap_aligned_alloc(multi_heap_handle_t heap, size_t size, size_t alignment); 35 /** @brief malloc() a buffer in a given heap 37 …re the same as standard malloc(), only the returned buffer will be allocated in the specified heap. 39 * @param heap Handle to a registered heap. 44 void *multi_heap_malloc(multi_heap_handle_t heap, size_t size); 46 /** @brief free() a buffer aligned in a given heap. [all …]
|
D | esp_heap_trace.h | 18 #warning "esp_heap_trace.h is included but heap tracing is disabled in menuconfig, functions are no… 48 * @brief Stores information about the result of a heap trace. 51 heap_trace_mode_t mode; ///< The heap trace mode we just completed / are running 65 * @brief Initialise heap tracing in standalone mode. 67 * This function must be called before any other heap tracing functions. 69 …* To disable heap tracing and allow the buffer to be freed, stop tracing and then call heap_trace_… 71 * @param record_buffer Provide a buffer to use for heap trace data. 73 * @param num_records Size of the heap trace buffer, as number of record structures. 75 * - ESP_ERR_NOT_SUPPORTED Project was compiled without heap tracing enabled in menuconfig. 76 * - ESP_ERR_INVALID_STATE Heap tracing is currently in progress. [all …]
|
D | esp_heap_caps.h | 203 …* @note Note that because of heap fragmentation it is probably not possible to allocate a single b… 220 …* @note Note the result may be less than the global all-time minimum available heap of this kind, … 222 * this result still gives a "worst case" indication for all-time minimum free heap. 245 * @brief Get heap info for all regions with the given capabilities. 252 * heap metadata. 273 * @brief Check integrity of all heap memory in the system. 280 * @param print_errors Print specific errors if heap corruption is found. 285 * @return True if all heaps are valid, False if at least one heap is corrupt. 295 * See also heap_caps_check_integrity_all to check all heap memory 301 * @param print_errors Print specific errors if heap corruption is found. [all …]
|
D | esp_heap_caps_init.h | 16 * @brief Initialize the capability-aware heap allocator. 24 * @brief Enable heap(s) in memory regions where the startup stacks are located. 28 * completely started, they do not use that memory anymore and heap(s) there can 40 * Call this function to add a region of memory to the heap at some later time. 52 …* @note Please refer to following example for memory regions allowed for addition to heap based on… 80 …* @note Please refer to following example for memory regions allowed for addition to heap based on… 102 * - ESP_ERR_NO_MEM if no memory to register new heap. 103 * - ESP_ERR_INVALID_SIZE if the memory region is too small to fit a heap
|
D | esp_heap_task_info.h | 17 // heap allocation info according to one or more sets of heap capabilities. 20 /** @brief Structure to collect per-task heap allocation totals partitioned by selected caps */ 36 * The 'caps' and 'mask' arrays allow partitioning the per-task heap allocation 37 * totals by selected sets of heap region capabilities so that totals for 74 * @brief Return per-task heap allocation totals and lists of blocks. 76 * For each task that has allocated memory from the heap, return totals for
|
/hal_espressif-latest/components/heap/ |
D | multi_heap.c | 30 /* if no heap poisoning, public API aliases directly to these implementations */ 31 void *multi_heap_malloc(multi_heap_handle_t heap, size_t size) 34 void *multi_heap_aligned_alloc(multi_heap_handle_t heap, size_t size, size_t alignment) 37 void multi_heap_aligned_free(multi_heap_handle_t heap, void *p) 40 void multi_heap_free(multi_heap_handle_t heap, void *p) 43 void *multi_heap_realloc(multi_heap_handle_t heap, void *p, size_t size) 46 size_t multi_heap_get_allocated_size(multi_heap_handle_t heap, void *p) 52 void multi_heap_get_info(multi_heap_handle_t heap, multi_heap_info_t *info) 55 size_t multi_heap_free_size(multi_heap_handle_t heap) 58 size_t multi_heap_minimum_free_size(multi_heap_handle_t heap) [all …]
|
D | heap_caps.c | 111 bool heap_caps_match(const heap_t *heap, uint32_t caps) in heap_caps_match() argument 113 return heap->heap != NULL && ((get_all_caps(heap) & caps) == caps); in heap_caps_match() 134 …//NULL directly, even although our heap capabilities (based on soc_memory_tags & soc_memory_region… in heap_caps_malloc_base() 151 heap_t *heap; in heap_caps_malloc_base() local 152 SLIST_FOREACH(heap, ®istered_heaps, next) { in heap_caps_malloc_base() 153 if (heap->heap == NULL) { in heap_caps_malloc_base() 156 if ((heap->caps[prio] & caps) != 0) { in heap_caps_malloc_base() 157 … //Heap has at least one of the caps requested. If caps has other bits set that this prio in heap_caps_malloc_base() 159 if ((get_all_caps(heap) & caps) == caps) { in heap_caps_malloc_base() 160 … //This heap can satisfy all the requested capabilities. See if we can grab some memory using it. in heap_caps_malloc_base() [all …]
|
D | Kconfig | 1 menu "Heap memory debugging" 4 prompt "Heap corruption detection" 7 …Enable heap poisoning features to detect heap corruption caused by out-of-bounds access to heap me… 9 See the "Heap Memory Debugging" page of the IDF documentation 10 for a description of each level of heap corruption detection. 21 bool "Heap tracing" 24 Enables the heap tracing API defined in esp_heap_trace.h. 26 … This function causes a moderate increase in IRAM code side and a minor increase in heap function 44 Enables/disables heap tracing API. 47 int "Heap tracing stack depth" [all …]
|
D | multi_heap_internal.h | 9 * in the heap component should not be cloned by the compiler */ 17 An instance of this structure will be provided to the heap in ROM for use if needed. 32 /* Opaque handle to a heap block */ 38 If heap poisioning is disabled, these are aliased directly to the public API. 40 If heap poisoning is enabled, wrapper functions call each of these. 43 void *multi_heap_malloc_impl(multi_heap_handle_t heap, size_t size); 46 void *multi_heap_aligned_alloc_impl(multi_heap_handle_t heap, size_t size, size_t alignment); 49 void *multi_heap_aligned_alloc_impl_offs(multi_heap_handle_t heap, size_t size, size_t alignment, s… 51 void multi_heap_free_impl(multi_heap_handle_t heap, void *p); 52 void *multi_heap_realloc_impl(multi_heap_handle_t heap, void *p, size_t size); [all …]
|
D | heap_caps_init.c | 26 region->heap = multi_heap_register((void *)region->start, heap_size); in register_heap() 27 if (region->heap != NULL) { in register_heap() 28 ESP_EARLY_LOGD(TAG, "New heap initialised at %p", region->heap); in register_heap() 34 heap_t *heap; in heap_caps_enable_nonos_stack_heaps() local 35 SLIST_FOREACH(heap, ®istered_heaps, next) { in heap_caps_enable_nonos_stack_heaps() 36 // Assume any not-yet-registered heap is in heap_caps_enable_nonos_stack_heaps() 37 // a nonos-stack heap in heap_caps_enable_nonos_stack_heaps() 38 if (heap->heap == NULL) { in heap_caps_enable_nonos_stack_heaps() 39 register_heap(heap); in heap_caps_enable_nonos_stack_heaps() 40 if (heap->heap != NULL) { in heap_caps_enable_nonos_stack_heaps() [all …]
|
D | multi_heap_poisoning.c | 27 * fill and check memory region with given patterns in the heap 101 …MULTI_HEAP_STDERR_PRINTF("CORRUPT HEAP: Bad head at %p. Expected 0x%08x got 0x%08x\n", &head->head… in verify_allocated_region() 117 …MULTI_HEAP_STDERR_PRINTF("CORRUPT HEAP: Bad tail at %p. Expected 0x%08x got 0x%08x\n", &tail->tail… in verify_allocated_region() 155 …MULTI_HEAP_STDERR_PRINTF("CORRUPT HEAP: Invalid data at %p. Expected 0x%08x got 0x%08x\n", p, EXPE… in verify_fill_pattern() 178 …MULTI_HEAP_STDERR_PRINTF("CORRUPT HEAP: Invalid data at %p. Expected 0x%02x got 0x%02x\n", p, (uin… in verify_fill_pattern() 196 * heap poisoning. 209 void *multi_heap_aligned_alloc(multi_heap_handle_t heap, size_t size, size_t alignment) in multi_heap_aligned_alloc() argument 219 multi_heap_internal_lock(heap); in multi_heap_aligned_alloc() 220 poison_head_t *head = multi_heap_aligned_alloc_impl_offs(heap, size + POISON_OVERHEAD, in multi_heap_aligned_alloc() 231 multi_heap_internal_unlock(heap); in multi_heap_aligned_alloc() [all …]
|
D | heap_private.h | 19 /* Some common heap registration data structures used 20 for heap_caps_init.c to share heap information with heap_caps.c 25 /* Type for describing each registered heap */ 27 …uint32_t caps[SOC_MEMORY_TYPE_NO_PRIOS]; ///< Capabilities for the type of memory in this heap (as… 31 multi_heap_handle_t heap; member 38 This means at the expense of 4 bytes per heap, new heaps can be 43 bool heap_caps_match(const heap_t *heap, uint32_t caps); 45 /* return all possible capabilities (across all priorities) for a given heap */ 46 inline static uint32_t get_all_caps(const heap_t *heap) in get_all_caps() argument 48 if (heap->heap == NULL) { in get_all_caps() [all …]
|
D | heap_task_info.c | 17 * Return per-task heap allocation totals and lists of blocks. 19 * For each task that has allocated memory from the heap, return totals for 45 multi_heap_handle_t heap = reg->heap; in heap_caps_get_per_task_info() local 46 if (heap == NULL) { in heap_caps_get_per_task_info() 50 // Find if the capabilities of this heap region match on of the desired in heap_caps_get_per_task_info() 63 multi_heap_block_handle_t b = multi_heap_get_first_block(heap); in heap_caps_get_per_task_info() 64 multi_heap_internal_lock(heap); in heap_caps_get_per_task_info() 65 for ( ; b ; b = multi_heap_get_next_block(heap, b)) { in heap_caps_get_per_task_info() 70 size_t bsize = multi_heap_get_allocated_size(heap, p); // Validates in heap_caps_get_per_task_info() 115 multi_heap_internal_unlock(heap); in heap_caps_get_per_task_info()
|
D | internals.md | 3 …heap component is compiled and linked in a way that minimizes the utilization of the IRAM section … 9 …heap component API functions placed in IRAM have to also be placed in IRAM. Symmetrically, the fun…
|
D | .build-test-rules.yml | 3 components/heap/test_apps/heap_tests: 8 components/heap/test_apps/host_test_linux:
|
/hal_espressif-latest/components/esp_system/include/ |
D | esp_system.h | 89 * @brief Get the size of available heap. 94 * @return Available heap size, in bytes. 99 * @brief Get the size of available internal heap. 104 * @return Available internal heap size, in bytes. 109 * @brief Get the minimum heap that has ever been available 111 * @return Minimum free heap ever available
|
/hal_espressif-latest/components/esp_system/port/soc/esp32s2/ |
D | Kconfig.memory | 14 … If this option is disabled, the DRAM part of the heap starts right after the .bss section, 16 will change the available heap size. 18 … If this option is enabled, the DRAM part of the heap starts right after the dram0_0 region, 30 as heap memory after app startup.
|
D | Kconfig.cache | 9 then the other 8KB will be added to the heap. 34 If you use 0KB data cache, the other 16KB will be added to the heap 35 … If you use 8KB data cache rather than 16KB data cache, the other 8KB will be added to the heap
|
/hal_espressif-latest/components/esp_system/port/soc/esp32s3/ |
D | Kconfig.memory | 14 … If this option is disabled, the DRAM part of the heap starts right after the .bss section, 16 will change the available heap size. 18 … If this option is enabled, the DRAM part of the heap starts right after the dram0_0 region, 30 as heap memory after app startup.
|
D | Kconfig.cache | 9 then the other 16KB will be managed by heap allocator. 72 the other 32KB will be added to the heap. 84 … # For 16KB the actual configuration is 32kb cache, but 16kb will be reserved for heap at startup
|
/hal_espressif-latest/components/newlib/ |
D | heap.c | 16 …These contain the business logic for the malloc() and realloc() implementation. Because of heap tr… 100 instead of the heap implementation from newlib. 106 /* The following functions are implemented by newlib's heap allocator, 107 but aren't available in the heap component. 109 can not cause the newlib heap implementation to be linked in
|
D | CMakeLists.txt | 10 "heap.c" 41 set_source_files_properties(heap.c PROPERTIES COMPILE_FLAGS -fno-builtin) 43 # Forces the linker to include heap, syscall, pthread, assert, and retargetable locks from this com…
|
/hal_espressif-latest/components/esp_system/port/soc/esp32/ |
D | Kconfig.memory | 17 … If this option is disabled, the DRAM part of the heap starts right after the .bss section, 19 will change the available heap size. 21 … If this option is enabled, the DRAM part of the heap starts right after the dram0_0 region,
|
/hal_espressif-latest/components/esp_hw_support/ |
D | esp_memory_utils.c | 39 * for single core configuration (where it gets added to system heap) following in esp_ptr_byte_accessible() 48 * added to the heap in 2 blocks of 32 kB (from 0x3FCF0000) and 16 kB in esp_ptr_byte_accessible() 52 * the internal RAM when added to the heap and is byte-accessible .*/ in esp_ptr_byte_accessible()
|
/hal_espressif-latest/components/log/ |
D | log.c | 16 * should be effective. Cache is a binary min-heap of cached_tag_entry_t 22 * min-heap. 236 // Restore heap ordering in get_cached_log_level() 251 // This happens to satisfy binary min-heap ordering. in add_to_cache() 261 // because this is a min-heap) with the new one, and do bubble-down in add_to_cache() 262 // operation to restore min-heap ordering. in add_to_cache()
|