svn commit: r343566 - in head/lib/libthr: . thread

Alexey Dokuchaev danfe at freebsd.org
Wed Jan 30 05:37:10 UTC 2019


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. :-)

./danfe


More information about the svn-src-head mailing list