Commit graph

11 commits

Author SHA1 Message Date
Guillaume Souchere
eaa11bbf5d tlsf: fix input validation of tlsf_t parameter and comment tlsf_fit_size() 2022-10-19 07:53:06 +02:00
X-Ryl669
4d43b0df1c Multiple heap TLSF 2022-09-20 10:22:27 +02:00
Guillaume Souchere
83dac36eda Add missing doxygen comments on the tlsf_check_hook() declaration 2022-08-25 11:57:43 +02:00
Guillaume Souchere
9393b12cac Add a function hook called in tlsf_check() on every free block of memory
In this commit:
- We add a weak delcaration of tlsf_check_hook() in tlsf.h.
- We call tlsf_check_hook() in tlsf_check() if the function has a defintion

This hook function allows the user to implement application specific checks on
the memory of every free blocks (e.g. check for memory corruption).
2022-08-10 08:26:10 +02:00
Ivan Grokhotkov
1968e04261 introduce tlsf_memalign_offs
Initial commit: d902b4e7db
2022-07-29 09:39:32 +02:00
Ivan Grokhotkov
b76f0fefd1 Add heap poisoning mechanism to fill absorbed block header with the right pattern.
Note: block_absorb() is called in tlsf_free(), which is eventually called in multi_heap_free()
after the memory fill is done. As the block_absorb merges 2 blocks together, the previous block
header of the merged block is now in the middle of the memory block but not filled with 0xfe.

- Remove dependencies with the heap component of the IDF.
- The tlsf_poison_fill_region_hook() function is defined as weak in IDF and checked for NULL
in block_absorb() function in order to minimize the dependencies between IDF and the TLSF.
- The the implementation of tlsf_poison_fill_region_hook() must be provided at the discretion
of the user.
2022-07-26 14:40:25 +02:00
Ivan Grokhotkov
1f77a1d2a1 add tlsf_block_functions.h and tlsf_common.h files 2022-07-26 14:38:30 +02:00
Ivan Grokhotkov
61bbda7f4a move includes to tlsf.c, add license 2022-07-25 12:45:58 +02:00
matthew conte
7d6c9a78da Fix broken link, placeholder text in copyright. 2016-04-11 17:08:29 -07:00
Niklas Hauser
757298305a Fix [-Wstrict-prototypes] warnings. 2016-04-11 21:13:44 +01:00
matthew conte
8b7c441ecf Added files via upload
Add tlsf.h, tlsf.c, version 3.1.
2016-04-10 15:02:17 -07:00