mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +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:
@@ -116,12 +116,21 @@ void *heap_caps_realloc( void *ptr, size_t size, int caps);
|
||||
*
|
||||
* @return A pointer to the memory allocated on success, NULL on failure
|
||||
*
|
||||
* @note Any memory allocated with heaps_caps_aligned_alloc() MUST
|
||||
* be freed with heap_caps_aligned_free() and CANNOT be passed to free()
|
||||
*
|
||||
*/
|
||||
void *heap_caps_aligned_alloc(size_t alignment, size_t size, int caps);
|
||||
|
||||
/**
|
||||
* @brief Used to deallocate memory previously allocated with heap_caps_aligned_alloc
|
||||
*
|
||||
* @param ptr Pointer to the memory allocated
|
||||
* @note This function is aimed to deallocate only memory allocated with
|
||||
* heap_caps_aligned_alloc, memory allocated with heap_caps_malloc
|
||||
* MUST not be passed to this function
|
||||
* @note This function is deprecated, plase consider using heap_caps_free() instead
|
||||
*/
|
||||
void __attribute__((deprecated)) heap_caps_aligned_free(void *ptr);
|
||||
|
||||
/**
|
||||
* @brief Allocate a aligned chunk of memory which has the given capabilities. The initialized value in the memory is set to zero.
|
||||
*
|
||||
@@ -134,20 +143,9 @@ void *heap_caps_aligned_alloc(size_t alignment, size_t size, int caps);
|
||||
*
|
||||
* @return A pointer to the memory allocated on success, NULL on failure
|
||||
*
|
||||
* @note Any memory allocated with heap_caps_aligned_calloc() MUST
|
||||
* be freed with heap_caps_aligned_free() and CANNOT be passed to free()
|
||||
*/
|
||||
void *heap_caps_aligned_calloc(size_t alignment, size_t n, size_t size, uint32_t caps);
|
||||
|
||||
/**
|
||||
* @brief Used to deallocate memory previously allocated with heap_caps_aligned_alloc
|
||||
*
|
||||
* @param ptr Pointer to the memory allocated
|
||||
* @note This function is aimed to deallocate only memory allocated with
|
||||
* heap_caps_aligned_alloc, memory allocated with heap_caps_malloc
|
||||
* MUST not be passed to this function
|
||||
*/
|
||||
void heap_caps_aligned_free(void *ptr);
|
||||
|
||||
/**
|
||||
* @brief Allocate a chunk of memory which has the given capabilities. The initialized value in the memory is set to zero.
|
||||
|
Reference in New Issue
Block a user