From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5092 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] add definition of max_align_t to stddef.h Date: Thu, 8 May 2014 10:25:08 -0400 Message-ID: <20140508142508.GI26358@brightrain.aerifal.cx> References: <20140507031306.GA26963@brightrain.aerifal.cx> <5369B32E.9060108@gentoo.org> <20140507042912.GA27456@brightrain.aerifal.cx> <5369C0C7.8070208@gentoo.org> <20140507224841.GB26358@brightrain.aerifal.cx> <536B7378.8070307@gentoo.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1399559132 14075 80.91.229.3 (8 May 2014 14:25:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 May 2014 14:25:32 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5098-gllmg-musl=m.gmane.org@lists.openwall.com Thu May 08 16:25:25 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WiPGE-0002sV-Dn for gllmg-musl@plane.gmane.org; Thu, 08 May 2014 16:25:22 +0200 Original-Received: (qmail 3866 invoked by uid 550); 8 May 2014 14:25:21 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3858 invoked from network); 8 May 2014 14:25:21 -0000 Content-Disposition: inline In-Reply-To: <536B7378.8070307@gentoo.org> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5092 Archived-At: On Thu, May 08, 2014 at 02:07:20PM +0200, Luca Barbato wrote: > >> That's the part that is annoying, the larger register is 32byte in those > >> platforms. > > > > And it will keep getting larger. Obviously changing the definition of > > types and/or the ABI again and again is not the solution. The solution > > is requesting the alignment you want. > > No, but having the correct value for new architectures would be sort of > more correct. Is not that those won't be used. I'm not sure what you mean by "the correct value". The definition with the union should give the correct value (max alignment requirement of any standard type) for all archs. > > In any case, the overhead would be undesirable. If/when I make some > > improvements to malloc and its strategy for returning memory for use > > by other processes (freeing commit charge), I'm also hoping to drop > > the granularity on 64-bit platforms from 32 down to 16 or maybe even > > smaller. There's really no need to store a size_t in the headers for > > chunks which are only used for allocation sizes up to 128k/256k. > > I see, nice to know that's the plan =) As said it would had been a nice > to have if it comes for free. Yeah, not much comes for free though... Rich