aboutsummaryrefslogtreecommitdiff
path: root/tinyalloc.h
Commit message (Collapse)AuthorAgeFilesLines
* Redesign with sbrk(2)Xavier Del Campo Romero2025-11-101-2/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Avoid undefined behaviour on const castXavier Del Campo Romero2025-07-261-1/+1
| | | | | Removing the const qualifier from a const-qualified object and modify it is undefined behaviour.
* Implement ta_reallocXavier Del Campo Romero2025-07-261-0/+1
|
* Allow inclusion in CPP projectsRyzee1192020-09-171-0/+8
| | | | Attempted to use in Arduino, but got linker errors. This resolved the issue.
* Move compile-time configuration into a runtime configuration.Matt Reyer2019-07-011-1/+1
| | | | - Updated README
* add TA_DISABLE_* defines, update compact, memclear, add license, update readmeKarsten Schmidt2017-07-151-26/+1
|
* update readme, add mem layout diag, rename defines & heap struct fieldsKarsten Schmidt2017-07-141-2/+2
|
* rename fns again, add ta_calloc() & memsetKarsten Schmidt2017-07-141-0/+37