svn commit: r343566 - in head/lib/libthr: . thread
Alexey Dokuchaev
danfe at freebsd.org
Wed Jan 30 11:58:10 UTC 2019
On Wed, Jan 30, 2019 at 05:37:09AM +0000, Alexey Dokuchaev wrote:
> On Tue, Jan 29, 2019 at 10:46:45PM +0000, Konstantin Belousov wrote:
> > New Revision: 343566
> > URL: https://svnweb.freebsd.org/changeset/base/343566
> >
> > Log:
> > Untangle jemalloc and mutexes initialization.
> >
> > The need to use libc malloc(3) from some places in libthr always
> > caused issues. For instance, per-thread key allocation was switched to
> > use plain mmap(2) to get storage, because some third party mallocs
> > used keys for implementation of calloc(3).
> >
> > Even more important, libthr calls calloc(3) during initialization of
> > pthread mutexes, and jemalloc uses pthread mutexes. Jemalloc provides
> > some way to both postpone the initialization, and to make
> > initialization to use specialized allocator, but this is very fragile
> > and often breaks. See the referenced PR for another example.
>
> Could this also fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220767
> I wonder... Going through the "make world" now to test some Quake II. :-)
I've updated to the latest -CURRENT (r343572) and now Quake II starts fine
again, like it was in jemalloc pre-5.0.0 times. Thank you Kostik!
./danfe
More information about the svn-src-all
mailing list