Groups | Search | Server Info | Login | Register


Groups > muc.lists.netbsd.tech.userlevel > #11755

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

From Valery Ushakov <uwe@stderr.spb.ru>
Newsgroups muc.lists.netbsd.tech.userlevel
Subject libphkmalloc? (Was: CVS commit: src/lib/libbsdmalloc)
Date 2026-04-28 19:33 +0300
Organization Newsgate at muc.de e.V.
Message-ID <afDhXVxpdLygT8bn@snips.stderr.spb.ru> (permalink)
References <20260428130210.539E3FA26@cvs.NetBSD.org>

Show all headers | View raw


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

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de

Back to muc.lists.netbsd.tech.userlevel | Previous | NextNext in thread | Find similar


Thread

libphkmalloc? (Was: CVS commit: src/lib/libbsdmalloc) Valery Ushakov <uwe@stderr.spb.ru> - 2026-04-28 19:33 +0300
  Re: libphkmalloc? (Was: CVS commit: src/lib/libbsdmalloc) Jason Thorpe <thorpej@me.com> - 2026-04-28 10:13 -0700

csiph-web