aboutsummaryrefslogtreecommitdiff
path: root/tinyalloc.xml
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-11-10 23:50:41 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2025-11-10 23:50:41 +0100
commitfd8128d9b84e362abdbd05fafe252421edee8ab2 (patch)
tree4350d5b79a2e0e225dd4bb32511d4b8bd85a1338 /tinyalloc.xml
parent96d060679a4c34c30a346f1945f88cb8ef45f657 (diff)
Redesign with sbrk(2)
So far, tinyalloc was designed for a static heap area, failing to allocate whenever the end boundary was reached. Unfortunately, this design was too limiting if the same library were to be used for WebAssembly applications, where interpreters are required to implement the current_memory and grow_memory operators. [1] Whereas the former returns the number of currently allocated pages by the interpreter (64 KiB being the standard page size), the latter must increase that number by the number of pages required by the caller, but without exceeding the maximum limit imposed by the application developer. Since WebAssembly's grow_memory is usually converted to sbrk(2) by implementations, tinyalloc now makes use of this traditional syscall to achieve the desired effect. [1]: https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#-hrefsyntax-instr-memorymathsfmemorygrow
Diffstat (limited to 'tinyalloc.xml')
0 files changed, 0 insertions, 0 deletions