[libc-commits] [libc] [llvm] [libc] add basic arena allocator (PR #121173)
Daniel Thornburgh via libc-commits
libc-commits at lists.llvm.org
Wed Jan 8 10:31:57 PST 2025
================
@@ -115,6 +115,16 @@
"LIBC_ADD_NULL_CHECKS": {
"value": true,
"doc": "Add nullptr checks in the library's implementations to some functions for which passing nullptr is undefined behavior."
+ },
+ "LIBC_CONF_ALLOC_TYPE": {
+ "value": "LIBC_ALLOC_TYPE_ARENA",
+ "doc": "The implementation used for allocations, acceptable values are LIBC_ALLOC_TYPE_EXTERN, LIBC_ALLOC_TYPE_SCUDO, LIBC_ALLOC_TYPE_ARENA."
----------------
mysterymath wrote:
How does this interact with the existing baremetal allocator present in the libc? Immediately it's unusual that it isn't present in a list of allocators.
The allocator doesn't currently work for Linux, but that's something I'm planning to fix in the near future. It's just for lack of a `__morecore` abstraction hooked up to e.g. `sbrk`, plus the plumbing for that sycall.
https://github.com/llvm/llvm-project/pull/121173
More information about the libc-commits
mailing list