From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11665 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] optimize malloc0 Date: Wed, 5 Jul 2017 08:45:40 -0400 Message-ID: <20170705124540.GX1627@brightrain.aerifal.cx> References: <20170626214339.10942-1-amonakov@ispras.ru> <20170704214554.GS1627@brightrain.aerifal.cx> <20170704233910.GW1627@brightrain.aerifal.cx> <20170705084909.GF2032@port70.net> 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 1499258758 26127 195.159.176.226 (5 Jul 2017 12:45:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Jul 2017 12:45:58 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11678-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 05 14:45:54 2017 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 1dSjgk-0006Q1-Rr for gllmg-musl@m.gmane.org; Wed, 05 Jul 2017 14:45:50 +0200 Original-Received: (qmail 15672 invoked by uid 550); 5 Jul 2017 12:45:53 -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 15651 invoked from network); 5 Jul 2017 12:45:52 -0000 Content-Disposition: inline In-Reply-To: <20170705084909.GF2032@port70.net> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11665 Archived-At: On Wed, Jul 05, 2017 at 10:49:10AM +0200, Szabolcs Nagy wrote: > * Rich Felker [2017-07-04 19:39:10 -0400]: > > On Wed, Jul 05, 2017 at 02:09:21AM +0300, Alexander Monakov wrote: > > > I can rewrite it fully forward scanning without much trouble, but I > > > think it wouldn't be for the better. > > > > *nod* I'll re-check the version you submitted just to be sure I > > understand and agree that it's doing what I think it is, with the plan > > of going with it or something very similar. I might add some comments > > as a follow-up patch. > > i think may_alias should be added and uint64_t used > instead of unsigned long long (which may have a size > that does not divide pagesize) I agree about may_alias (forgot to mention that; believe we discussed it on IRC before). I don't think ull is a practical issue (there are probably other places we assume all integer types have power-of-two sizes and this seems like a totally reasonable assumption) but I don't mind changing it to uint64_t for obviousness/generality. Hidden assumptions like this tend to bite future readers. Rich