mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-22 17:02:25 +00:00
heap_tlsf: added implementation of TLSF allocator
heap: ported tlsf allocator into multi heap heap_host_tests: added tlsf allocator into host test heap_host_test: update freebytes after using free heap_tests: tlsf now passing on host tests without poisoning multi_heap: added support for memalign using tlsf implementation heap_caps: removed heap_caps_aligned_free heap/test: fixed broken aligned alloc test build heap: added poisoning pattern when blocks are being merged heap/tests: added timing tests for memory allocation heap: reduced tlsf structure overhead heap/tlsf: made all short functions inside of tlsf module as inline to improve timings heap: moved tlsf heap routines outside of flash memory newlib: linked multiheap memalign with newlib memalign function heap: moved block member functions to a separate file so multi_heap can use the functions heap/test: improved the tlsf timing test heap/test: added memalign on aligned alloc tests heap: moved tlsf configuration constants to a separated file heap: added random allocations test with timings heap: modified the calculation of heap free bytes heap: make aligned free true deprecated functions and update their documentation heap: add extra assert after successive mallocs on small allocation host test heap: remove legacy aligned alloc implementation. performance: added malloc and free time performance default values
This commit is contained in:
@@ -598,6 +598,11 @@ IRAM_ATTR void *heap_caps_aligned_alloc(size_t alignment, size_t size, int caps)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void heap_caps_aligned_free(void *ptr)
|
||||
{
|
||||
heap_caps_free(ptr);
|
||||
}
|
||||
|
||||
void *heap_caps_aligned_calloc(size_t alignment, size_t n, size_t size, uint32_t caps)
|
||||
{
|
||||
size_t size_bytes;
|
||||
@@ -611,15 +616,4 @@ void *heap_caps_aligned_calloc(size_t alignment, size_t n, size_t size, uint32_t
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
IRAM_ATTR void heap_caps_aligned_free(void *ptr)
|
||||
{
|
||||
if (ptr == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
heap_t *heap = find_containing_heap(ptr);
|
||||
assert(heap != NULL && "free() target pointer is outside heap areas");
|
||||
multi_heap_aligned_free(heap->heap, ptr);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user