aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/malloc/Makefile.inc
Commit message (Collapse)AuthorAgeFilesLines
* libc: Add free_sized() and free_aligned_sized() as per C23Faraz Vahedi2026-06-071-0/+9
| | | | | | | | | | | | | | | | | | | | | Add C23 sized deallocation entry points as thin wrappers around free(3). Implementations may ignore size and alignment hints, so behaviour stays correct for existing allocations without validating caller metadata yet. When jemalloc is updated to 5.3.1, rewire these to je_free_sized() and je_free_aligned_sized() so deallocation can use the allocator's sized deallocation (free_sized for fast paths and free_aligned_sized for correct aligned hints.) Please note this change satisfies the standard interface only. Both functions should be delegated to jemalloc after the upgrade so callers get the intended allocator behaviour; until then, hints are unused and neither sized nor aligned-sized deallocation optimizations apply. Signed-off-by: Faraz Vahedi <kfv@kfv.io> Reviewed by: fuz Pull Request: https://github.com/freebsd/freebsd-src/pull/2201 MFC after: 1 month
* libc: add LIBC_MALLOC optionBrooks Davis2023-09-011-1/+1
| | | | | | | | | | This will enable alternative mallocs to be included in the tree and selected by setting LIBC_MALLOC. As there is only one today (jemalloc) this option does nothing, but we expect to add other implementations in the future. This will also reduce diffs to CheriBSD. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41660
* libc: regoranize malloc buildBrooks Davis2023-08-161-0/+3
Create a stdlib/malloc to hold the definition of the malloc interface (e.g., the Symbol.map file) and make jemalloc a subdirectory. This will make it easier to integrate alternative allocators such as snmalloc while making it clear that the current jemalloc symbols are the FreeBSD API/ABI (for better or worse). Suggested by: jrtc27 Reviewed by: jrtc27, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41457