summaryrefslogtreecommitdiff
path: root/lib/libbsdmalloc/malloc.c
AgeCommit message (Collapse)Author
2023-07-08Make mstats() decl match prototype so this compiles with -DMSTATS.simonb
2023-07-05libbsdmalloc: Use a multiply-overflow that clang supports too.riastradh
XXX pullup-10
2023-07-05libbsdmalloc: Make aligned_alloc(A, S) actually align when A > S.riastradh
XXX pullup-10
2023-07-05libbsdmalloc: Lift C11 divisibility restriction on aligned_alloc.riastradh
Restriction was lifted in C17. XXX pullup-10
2023-07-05libbsdmalloc: Fix build with DEBUG.riastradh
Nix __P while here. XXX pullup-10
2023-07-04libbsdmalloc: Nix K&R definitions. Bump WARNS to 3.riastradh
2023-07-04libbsdmalloc: Nix trailing whitespace.riastradh
No functional change intended. XXX pullup-10
2023-07-04libbsdmalloc: Provide all allocator front ends and fork hooks.riastradh
Front ends: - aligned_alloc - calloc - posix_memalign Fork hooks: - _malloc_prefork - _malloc_postfork - _malloc_postfork_child Otherwise these will pull in the jemalloc definitions from libc, which (a) defeats the purpose, and (b) won't work correctly with fork and threads. Thanks to kre@ and the thread on tech-userlevel for pointing me in the right direction to making this actually work to override jemalloc: https://mail-index.netbsd.org/tech-userlevel/2023/06/30/msg013957.html Note: libbsdmalloc doesn't set errno=ENOMEM on malloc failure, but these front ends do (even aligned_alloc, which is from C11, which doesn't define ENOMEM at all, but this pacifies our aligned_alloc tests in t_posix_memalign.c). Might want to fix that. XXX pullup-10
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-04-21Adding libbsdmalloc which is Chris Kingsley's `power of two bucket' malloc.elric
Suggested by christos.