Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2019 05:37:09 +0000
From:      Alexey Dokuchaev <danfe@freebsd.org>
To:        Konstantin Belousov <kib@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r343566 - in head/lib/libthr: . thread
Message-ID:  <20190130053709.GA35927@FreeBSD.org>
In-Reply-To: <201901292246.x0TMkjQH074121@repo.freebsd.org>
References:  <201901292246.x0TMkjQH074121@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190130053709.GA35927>