On Tue, Apr 28, 2026 at 10:13:08 -0700, Jason Thorpe wrote: > > On Apr 28, 2026, at 9:33 AM, Valery Ushakov <[email protected]> wrote: > > > > On Tue, Apr 28, 2026 at 13:02:10 +0000, Taylor R Campbell wrote: > > > >> Module Name: src > >> Committed By: riastradh > >> Date: Tue Apr 28 13:02:10 UTC 2026 > >> > >> Modified Files: > >> src/lib/libbsdmalloc: malloc.c > >> > >> Log Message: > >> libbsdmalloc: Use mutex_init, not mutex_unlock, in child post-fork. > > [...] > > > > I wonder if it's time to retire libbsdmalloc? > > Amusingly, I recently used the classical BSD malloc in the firmware > for a home-brew project, and was thinking that for really > constrained machines (e.g. 68010), it might be best if it were the > default.
I think you can unset HAVE_JEMALLOC in bsd.own.mk and get phkmalloc in libc. On macppc phkmalloc is a bit over 9K of text. bsdmalloc is a bit under 2K. But see https://phk.freebsd.dk/sagas/phkmalloc/ for the motivation and the story, including the pathologic paging the original malloc causes. -uwe
