Re: Future of jemalloc on FreeBSD after archive

From: Brooks Davis <brooks_at_freebsd.org>
Date: Tue, 10 Jun 2025 12:53:30 UTC
On Tue, Jun 10, 2025 at 08:15:02AM +0100, David Chisnall wrote:
> On 10 Jun 2025, at 00:17, Warner Losh <imp@bsdimp.com> wrote:
> > 
> > I'm unsure what to do in the future. What are all the cool kids using today?
> 
> I???ve replaced jemalloc with snmalloc (to which I am a contributor) in libc about five years ago and have been using that on a few places.  I believe Brooks imported a cleaned-up version of my patches to CheriBSD and was planning on upstreaming them as an option.
> 

I've been doing infrastructure work for this as a background task
due to a decision to switch back to a wrapped jemalloc for CheriBSD
heap temporal safety work (at the time we were debugging too many
different things at once and decided that wrapping jemalloc meant we
were debugging fewer things).

I think we should ship 15.0 with jemalloc, ideally updated to at least
5.3.0.  I'd also like to deprecate all the jemalloc specific symbols for
15 by removing default versions.  I've got a patch to do so, but probably
need an exprun for it and maybe a shim library to allow linkage with
those symbols.

Longer term, pivoting to a malloc with better hardening is certainly the
right thing to do and snmalloc is a candidate.

-- Brooks