From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12344 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 5/7] use the new lock algorithm for malloc Date: Tue, 9 Jan 2018 12:42:34 -0500 Message-ID: <20180109174234.GA1627@brightrain.aerifal.cx> References: <163ca89d544cffbaba5fcfbacf56fb589fd2b03a.1514985618.git.Jens.Gustedt@inria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1515519667 6830 195.159.176.226 (9 Jan 2018 17:41:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 Jan 2018 17:41:07 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12360-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 09 18:41:03 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1eYxtR-00019d-Jq for gllmg-musl@m.gmane.org; Tue, 09 Jan 2018 18:40:57 +0100 Original-Received: (qmail 19951 invoked by uid 550); 9 Jan 2018 17:42:49 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 19858 invoked from network); 9 Jan 2018 17:42:46 -0000 Content-Disposition: inline In-Reply-To: <163ca89d544cffbaba5fcfbacf56fb589fd2b03a.1514985618.git.Jens.Gustedt@inria.fr> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12344 Archived-At: On Wed, Jan 03, 2018 at 02:17:12PM +0100, Jens Gustedt wrote: > Malloc used a specialized lock implementation in many places. Now that we > have a generic lock that has the desired properties, we should just use > this, instead of this multitude of very similar lock mechanisms. > --- > src/malloc/malloc.c | 38 +++++++++++++------------------------- > 1 file changed, 13 insertions(+), 25 deletions(-) > > diff --git a/src/malloc/malloc.c b/src/malloc/malloc.c > index 9e05e1d6..6c667a5a 100644 > --- a/src/malloc/malloc.c > +++ b/src/malloc/malloc.c > @@ -13,6 +13,8 @@ > #define inline inline __attribute__((always_inline)) > #endif > > +#include "__lock.h" > + Ah, I see -- maybe you deemed malloc to be the only place where inlining for the sake of speed made sense? That's probably true. Rich