Home | History | Annotate | Download | only in libbsdmalloc
History log of /src/lib/libbsdmalloc/malloc.c
RevisionDateAuthorComments
 1.11  20-Jan-2025  riastradh libbsdmalloc: Fix sense of assertion in aligned_alloc.
 1.10  08-Jul-2023  simonb branches: 1.10.2;
Make mstats() decl match prototype so this compiles with -DMSTATS.
 1.9  05-Jul-2023  riastradh libbsdmalloc: Use a multiply-overflow that clang supports too.

XXX pullup-10
 1.8  05-Jul-2023  riastradh libbsdmalloc: Make aligned_alloc(A, S) actually align when A > S.

XXX pullup-10
 1.7  05-Jul-2023  riastradh libbsdmalloc: Lift C11 divisibility restriction on aligned_alloc.

Restriction was lifted in C17.

XXX pullup-10
 1.6  05-Jul-2023  riastradh libbsdmalloc: Fix build with DEBUG.

Nix __P while here.

XXX pullup-10
 1.5  04-Jul-2023  riastradh libbsdmalloc: Nix K&R definitions. Bump WARNS to 3.
 1.4  04-Jul-2023  riastradh libbsdmalloc: Nix trailing whitespace.

No functional change intended.

XXX pullup-10
 1.3  04-Jul-2023  riastradh libbsdmalloc: Provide all allocator front ends and fork hooks.

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
 1.2  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1  21-Apr-2003  elric Adding libbsdmalloc which is Chris Kingsley's `power of two bucket' malloc.

Suggested by christos.
 1.10.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed