4 ms·
Thanks for the link. Article makes it look like nothing happened in the embed/low-memory/single-threaded malloc space in decades since Doug Lea's malloc. I ju
by ncruces 18d ago
Thanks for the link.
Article makes it look like nothing happened in the embed/low-memory/single-threaded malloc space in decades since Doug Lea's malloc.
I just implemented TLSF for my minimal Wasm libc: fragmentation is just as good, performance is a lot more consistent (and on average better), for a significant reduction in code size.
http://www.gii.upv.es/tlsf/index.html http://www.gii.upv.es/tlsf/index.html
https://github.com/ncruces/wasm2go/blob/main/libc-gen/c/malloc_tlsf.c https://github.com/ncruces/wasm2go/blob/main/libc-gen/c/mall...
- egberts1 18d agoA great idea for another article. A focus, on embedded and malloc() I do do have a malloc() benchmark but it is in bad shape and directories have not coalesce nicely yet, tor a single run or a menu-driven one.
- thomasmg 18d agoInteresting! I have also implemented a version of TLSF for my (currently single-threaded) programming language. I also found it to be good for my use case (embedded / minimal code size). I'll compare it against yours. One improvement I did is some kind of preallocation for small blocks. https://github.com/thomasmueller/bau-lang/blob/main/src/main/java/org/bau/parser/StandardLib.java#L9 https://github.com/thomasmueller/bau-lang/blob/main/src/main...