tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libphkmalloc? (Was: CVS commit: src/lib/libbsdmalloc)



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?

Now that we have had jemalloc in libc for ages, may be it makes sense
to provide libphkmalloc instead?  It's a derivative of bsdmalloc that
fixed a bunch of problems (see phk's history writeup).  It's the
old-style sbrk-based malloc that might actually still be useful for
older software - jemalloc can be instructed to use sbrk, but it uses
TLS and that might conflict with older sofware that was written before
TLS and assumes some registers (that TLS ABI now uses) are available
to apps (e.g. I had to use it on NetBSD/sparc for Self
(selflanguage.org) b/c of this).

If we are going to go an extra mile, we migth as well do it with the
code that is actually useful :).

PS: Why bsdmalloc.3 is not insalled, btw?

-uwe


Home | Main Index | Thread Index | Old Index