Home
last modified time | relevance | path

Searched refs:heap (Results 1 – 25 of 129) sorted by relevance

123456

/hal_espressif-3.4.0/components/heap/
Dmulti_heap.c35 void *multi_heap_malloc(multi_heap_handle_t heap, size_t size)
38 void *multi_heap_aligned_alloc(multi_heap_handle_t heap, size_t size, size_t alignment)
41 void multi_heap_aligned_free(multi_heap_handle_t heap, void *p)
44 void multi_heap_free(multi_heap_handle_t heap, void *p)
47 void *multi_heap_realloc(multi_heap_handle_t heap, void *p, size_t size)
50 size_t multi_heap_get_allocated_size(multi_heap_handle_t heap, void *p)
56 void multi_heap_get_info(multi_heap_handle_t heap, multi_heap_info_t *info)
59 size_t multi_heap_free_size(multi_heap_handle_t heap)
62 size_t multi_heap_minimum_free_size(multi_heap_handle_t heap)
101 static void assert_valid_block(const heap_t *heap, const block_header_t *block) in assert_valid_block() argument
[all …]
Dheap_caps.c86 bool heap_caps_match(const heap_t *heap, uint32_t caps) in heap_caps_match() argument
88 return heap->heap != NULL && ((get_all_caps(heap) & caps) == caps); in heap_caps_match()
126 heap_t *heap; in heap_caps_malloc_base() local
127 SLIST_FOREACH(heap, &registered_heaps, next) { in heap_caps_malloc_base()
128 if (heap->heap == NULL) { in heap_caps_malloc_base()
131 if ((heap->caps[prio] & caps) != 0) { in heap_caps_malloc_base()
134 if ((get_all_caps(heap) & caps) == caps) { in heap_caps_malloc_base()
136 if ((caps & MALLOC_CAP_EXEC) && esp_ptr_in_diram_dram((void *)heap->start)) { in heap_caps_malloc_base()
140 … ret = multi_heap_malloc(heap->heap, size + 4); // int overflow checked above in heap_caps_malloc_base()
147 ret = multi_heap_malloc(heap->heap, size); in heap_caps_malloc_base()
[all …]
Dheap_caps_init.c34 region->heap = multi_heap_register((void *)region->start, heap_size); in register_heap()
35 if (region->heap != NULL) { in register_heap()
36 ESP_EARLY_LOGD(TAG, "New heap initialised at %p", region->heap); in register_heap()
42 heap_t *heap; in heap_caps_enable_nonos_stack_heaps() local
43 SLIST_FOREACH(heap, &registered_heaps, next) { in heap_caps_enable_nonos_stack_heaps()
46 if (heap->heap == NULL) { in heap_caps_enable_nonos_stack_heaps()
47 register_heap(heap); in heap_caps_enable_nonos_stack_heaps()
48 if (heap->heap != NULL) { in heap_caps_enable_nonos_stack_heaps()
49 multi_heap_set_lock(heap->heap, &heap->heap_mux); in heap_caps_enable_nonos_stack_heaps()
98 heap_t *heap = &temp_heaps[heap_idx]; in heap_caps_init() local
[all …]
Dmulti_heap_poisoning.c188 void *multi_heap_aligned_alloc(multi_heap_handle_t heap, size_t size, size_t alignment) in multi_heap_aligned_alloc() argument
198 multi_heap_internal_lock(heap); in multi_heap_aligned_alloc()
199 poison_head_t *head = multi_heap_aligned_alloc_impl_offs(heap, size + POISON_OVERHEAD, in multi_heap_aligned_alloc()
210 multi_heap_internal_unlock(heap); in multi_heap_aligned_alloc()
214 multi_heap_internal_unlock(heap); in multi_heap_aligned_alloc()
219 void *multi_heap_malloc(multi_heap_handle_t heap, size_t size) in multi_heap_malloc() argument
229 multi_heap_internal_lock(heap); in multi_heap_malloc()
230 poison_head_t *head = multi_heap_malloc_impl(heap, size + POISON_OVERHEAD); in multi_heap_malloc()
241 multi_heap_internal_unlock(heap); in multi_heap_malloc()
245 void multi_heap_free(multi_heap_handle_t heap, void *p) in multi_heap_free() argument
[all …]
Dmulti_heap_internal.h27 void *multi_heap_malloc_impl(multi_heap_handle_t heap, size_t size);
30 void *multi_heap_aligned_alloc_impl(multi_heap_handle_t heap, size_t size, size_t alignment);
33 void *multi_heap_aligned_alloc_impl_offs(multi_heap_handle_t heap, size_t size, size_t alignment, s…
35 void multi_heap_free_impl(multi_heap_handle_t heap, void *p);
36 void *multi_heap_realloc_impl(multi_heap_handle_t heap, void *p, size_t size);
38 void multi_heap_get_info_impl(multi_heap_handle_t heap, multi_heap_info_t *info);
39 size_t multi_heap_free_size_impl(multi_heap_handle_t heap);
40 size_t multi_heap_minimum_free_size_impl(multi_heap_handle_t heap);
41 size_t multi_heap_get_allocated_size_impl(multi_heap_handle_t heap, void *p);
57 void multi_heap_internal_lock(multi_heap_handle_t heap);
[all …]
DKconfig7 …Enable heap poisoning features to detect heap corruption caused by out-of-bounds access to heap me…
10 for a description of each level of heap corruption detection.
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.
54 Number of stack frames to save when tracing heap operation callers.
56 … More stack frames uses more memory in the heap trace buffer (and slows down allocation), but
60 bool "Enable heap task tracking"
63 Enables tracking the task responsible for each heap allocation.
65 …This function depends on heap poisoning being enabled and adds four more bytes of overhead for eac…
Dheap_task_info.c53 multi_heap_handle_t heap = reg->heap; in heap_caps_get_per_task_info() local
54 if (heap == NULL) { in heap_caps_get_per_task_info()
71 multi_heap_block_handle_t b = multi_heap_get_first_block(heap); in heap_caps_get_per_task_info()
72 multi_heap_internal_lock(heap); in heap_caps_get_per_task_info()
73 for ( ; b ; b = multi_heap_get_next_block(heap, b)) { in heap_caps_get_per_task_info()
78 size_t bsize = multi_heap_get_allocated_size(heap, p); // Validates in heap_caps_get_per_task_info()
123 multi_heap_internal_unlock(heap); in heap_caps_get_per_task_info()
Dheap_private.h39 multi_heap_handle_t heap; member
51 bool heap_caps_match(const heap_t *heap, uint32_t caps);
54 inline static IRAM_ATTR uint32_t get_all_caps(const heap_t *heap) in get_all_caps() argument
56 if (heap->heap == NULL) { in get_all_caps()
61 all_caps |= heap->caps[prio]; in get_all_caps()
/hal_espressif-3.4.0/components/heap/test_multi_heap_host/
Dtest_multi_heap.cpp23 multi_heap_handle_t heap = multi_heap_register(small_heap, sizeof(small_heap)); variable
25 size_t test_alloc_size = (multi_heap_free_size(heap) + 4) / 2;
28 multi_heap_dump(heap);
31 uint8_t *buf = (uint8_t *)multi_heap_malloc(heap, test_alloc_size);
38 REQUIRE( multi_heap_get_allocated_size(heap, buf) >= test_alloc_size );
39 REQUIRE( multi_heap_get_allocated_size(heap, buf) < test_alloc_size + 16);
43 REQUIRE( multi_heap_malloc(heap, test_alloc_size) == NULL );
45 multi_heap_free(heap, buf);
48 multi_heap_dump(heap);
52 buf = (uint8_t *)multi_heap_malloc(heap, test_alloc_size);
[all …]
/hal_espressif-3.4.0/components/heap/include/
Dmulti_heap.h41 void *multi_heap_aligned_alloc(multi_heap_handle_t heap, size_t size, size_t alignment);
52 void *multi_heap_malloc(multi_heap_handle_t heap, size_t size);
60 void __attribute__((deprecated)) multi_heap_aligned_free(multi_heap_handle_t heap, void *p);
69 void multi_heap_free(multi_heap_handle_t heap, void *p);
81 void *multi_heap_realloc(multi_heap_handle_t heap, void *p, size_t size);
92 size_t multi_heap_get_allocated_size(multi_heap_handle_t heap, void *p);
120 void multi_heap_set_lock(multi_heap_handle_t heap, void* lock);
128 void multi_heap_dump(multi_heap_handle_t heap);
140 bool multi_heap_check(multi_heap_handle_t heap, bool print_errors);
154 size_t multi_heap_free_size(multi_heap_handle_t heap);
[all …]
/hal_espressif-3.4.0/docs/en/api-reference/system/
Dmem_alloc.rst7 …tterns of *stack* (dynamic memory allocated by program control flow) and *heap* (dynamic memory al…
9 …has its own stack. By default, each of these stacks is allocated from the heap when the task is cr…
11 …t capabilities. A capabilities-based memory allocator allows apps to make heap allocations for dif…
13 For most purposes, the standard libc ``malloc()`` and ``free()`` functions can be used for heap all…
16 capabilities-based heap memory allocator. If you want to have memory with certain properties (for e…
23 …AM (Data RAM) is memory used to hold data. This is the most common kind of memory accessed as heap.
33 …in order to allocate DRAM that is byte-addressable. To test the free DRAM heap size at runtime, ca…
44heap contains all data memory which is not statically allocated by the app. Reducing statically al…
50 …160KB. The remaining 160KB (for a total of 320KB of DRAM) can only be allocated at runtime as heap.
52 …time, the available heap DRAM may be less than calculated at compile time, because at startup some…
[all …]
Dheap_debug.rst7 …esting :ref:`heap information <heap-information>`, :ref:`detecting heap corruption <heap-corruptio…
9 For general information about the heap memory allocator, see the :doc:`Heap Memory Allocation </api…
16 To obtain information about the state of the heap:
18 …RTOS function which returns the number of free bytes in the (data memory) heap. This is equivalent…
20heap. This is the largest single allocation which is currently possible. Tracking this value and …
21 …ated :cpp:func:`heap_caps_get_minimum_free_size` can be used to track the heap "low water mark" si…
22 …h contains the information from the above functions, plus some additional heap-specific data (numb…
24 …will output detailed information about the structure of each block in the heap. Note that this can…
32 Heap corruption detection allows you to detect various types of heap memory errors:
41 The heap implementation (``multi_heap.c``, etc.) includes a lot of assertions which will fail if th…
[all …]
/hal_espressif-3.4.0/zephyr/esp_shared/src/common/
Dheap_caps.c24 .heap = {
34 .heap = {
46 static void *z_esp_aligned_alloc(struct k_heap *heap, size_t align, size_t size) in z_esp_aligned_alloc() argument
63 mem = k_heap_aligned_alloc(heap, __align, size, K_NO_WAIT); in z_esp_aligned_alloc()
69 *heap_ref = heap; in z_esp_aligned_alloc()
77 static void *z_esp_aligned_calloc(struct k_heap *heap, size_t nmemb, size_t size) in z_esp_aligned_calloc() argument
84 ret = z_esp_aligned_alloc(heap, sizeof(void *), bounds); in z_esp_aligned_calloc()
/hal_espressif-3.4.0/examples/system/heap_task_tracking/
DREADME.md5 …t of memory in each iteration and demonstrates use of internal API to get heap info on per task ba…
7 …some of the internal heap debugging features (e.g. heap poisoning) which allows to store task cont…
9 This adds small memory overhead on per heap block and hence this feature should be used for debuggi…
/hal_espressif-3.4.0/docs/en/api-guides/performance/
Dram-usage.rst13 … static and dynamic memory usage in C, and the way ESP-IDF uses stack and heap. This information c…
23 ESP-IDF contains a range of heap APIs for measuring free heap at runtime. See :doc:`/api-reference/…
27heap fragmentation can be a significant issue alongside total RAM usage. The heap measurement APIs…
32 …memory usage of the application increases the amount of RAM available for heap at runtime, and vic…
34 …{IDF_TARGET_STATIC_MEANS_HEAP}) "static" buffers are still allocated from heap, but the allocation…
48heap. The stack size for each task is fixed (passed as an argument to :cpp:func:`xTaskCreate`). Ea…
57 … statically and/or see if you can save memory by allocating them from the heap only when they are …
94 For functions that assist in analyzing heap usage at runtime, see :doc:`/api-reference/system/heap_…
96 Normally, optimizing heap usage consists of analyzing the usage and removing calls to ``malloc()`` …
98 There are some ESP-IDF configuration options that can reduce heap usage at runtime:
[all …]
/hal_espressif-3.4.0/components/newlib/
DCMakeLists.txt10 "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-3.4.0/tools/test_idf_monitor/tests/
Din1.txt46 D (201) heap_init: New heap initialised at 0x3ffae6e0
48 D (212) heap_init: New heap initialised at 0x3ffb32f0
52 D (237) heap_init: New heap initialised at 0x40088afc
62 D (291) heap_init: New heap initialised at 0x3ffe0440
63 D (301) heap_init: New heap initialised at 0x3ffe4350
Din1f1.txt45 D (201) heap_init: New heap initialised at 0x3ffae6e0
47 D (212) heap_init: New heap initialised at 0x3ffb32f0
51 D (237) heap_init: New heap initialised at 0x40088afc
61 D (291) heap_init: New heap initialised at 0x3ffe0440
62 D (301) heap_init: New heap initialised at 0x3ffe4350
Din2.txt55 I (769) mdf_device_handle: [mdf_device_init_handle, 903]:free heap : 120948 B
165 …cb, 73]:parent: 00:00:00:00:00:00, mac:30:ae:a4:00:43:84, layer: -1, free heap: 87712, compile tim…
171 …rcb, 73]:parent: 20:a6:80:98:dc:b4, mac:30:ae:a4:00:43:84, layer: 1, free heap: 88452, compile tim…
220 …rcb, 73]:parent: 20:a6:80:98:dc:b4, mac:30:ae:a4:00:43:84, layer: 1, free heap: 71792, compile tim…
311 …rcb, 73]:parent: 20:a6:80:98:dc:b4, mac:30:ae:a4:00:43:84, layer: 1, free heap: 71792, compile tim…
404 …rcb, 73]:parent: 20:a6:80:98:dc:b4, mac:30:ae:a4:00:43:84, layer: 1, free heap: 71680, compile tim…
505 …rcb, 73]:parent: 20:a6:80:98:dc:b4, mac:30:ae:a4:00:43:84, layer: 1, free heap: 71680, compile tim…
596 …rcb, 73]:parent: 20:a6:80:98:dc:b4, mac:30:ae:a4:00:43:84, layer: 1, free heap: 71680, compile tim…
691 …rcb, 73]:parent: 20:a6:80:98:dc:b4, mac:30:ae:a4:00:43:84, layer: 1, free heap: 71680, compile tim…
792 …rcb, 73]:parent: 20:a6:80:98:dc:b4, mac:30:ae:a4:00:43:84, layer: 1, free heap: 71680, compile tim…
[all …]
/hal_espressif-3.4.0/examples/system/sysview_tracing_heap_log/
DREADME.md6heap tracing feature](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/system/h…
7 This example shows how to use this tool and IDF's scripts for host-based heap and log tracing analy…
9 …ions. This example uses IDF's heap tracing module to record allocations and deallocations to detec…
23 …ault SystemView shows only numeric values of IDs and parameters for IDF's heap messages in `Events…
53 5. You can filter out API related and heap events by right-clicking on any item in `Events` view an…
57 …nts' timestamps and parameters. So it can require some efforts to analyse heap operations flow. ID…
129 Processed 612 heap events.
/hal_espressif-3.4.0/components/wear_levelling/test_wl_host/
DMakefile.files25 heap/include \
34 heap/include \
/hal_espressif-3.4.0/components/heap/test/
DCMakeLists.txt3 PRIV_REQUIRES cmock test_utils heap)
/hal_espressif-3.4.0/tools/unit-test-app/configs/
Dheap_light_poison2 TEST_COMPONENTS=heap
Dheap_light_poison_c32 TEST_COMPONENTS=heap
/hal_espressif-3.4.0/docs/en/api-guides/
Dmemory-types.rst15 …ker into Internal SRAM as data memory. Remaining space in this region is used for the runtime heap.
23 …ble DRAM for static allocations - however the remaining DRAM is still available as heap at runtime.
29 …educed by the :ref:`iram` size of the compiled application. The available heap memory at runtime i…
61 …nstruction RAM will be made available as :ref:`dram` for static data and dynamic allocation (heap).
128 …In single core mode, remaining RTC fast memory is added to the heap unless the option :ref:`CONFIG…
132 …Remaining RTC fast memory is added to the heap unless the option :ref:`CONFIG_ESP_SYSTEM_ALLOW_RTC…

123456