From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 7339 invoked from network); 10 Apr 2020 17:22:06 -0000 Received-SPF: pass (mother.openwall.net: domain of lists.openwall.com designates 195.42.179.200 as permitted sender) receiver=inbox.vuxu.org; client-ip=195.42.179.200 envelope-from= Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with UTF8ESMTPZ; 10 Apr 2020 17:22:06 -0000 Received: (qmail 7511 invoked by uid 550); 10 Apr 2020 17:22:04 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 7490 invoked from network); 10 Apr 2020 17:22:04 -0000 Date: Fri, 10 Apr 2020 13:21:52 -0400 From: Rich Felker To: musl@lists.openwall.com Message-ID: <20200410172152.GS11469@brightrain.aerifal.cx> References: <20200408023229.GM11469@brightrain.aerifal.cx> <20200410154848.GP11469@brightrain.aerifal.cx> <20200410170407.GQ11469@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200410170407.GQ11469@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Concrete case-by-case examples of mallocng @ low usage On Fri, Apr 10, 2020 at 01:04:07PM -0400, Rich Felker wrote: > The following are tables of initial allocation behavior for all sizes > up through 16k assuming 4k page size. The fine classing figures won't > actually be used for initial allocations, but I've included them for > comparison to illustrate why coarse classes are used. These numbers > were all done by hand independently of the code, so that if actual > behavior differs, it indicates a bug in one or the other. > > > First 16 size classes, no coarse classing: > > 0-12: 2x2032 -> 2x1008 -> 2x496 -> 30x16 > 13-28: 2x2032 -> 2x1008 -> 2x496 -> 15x32 > 29-44: 2x2032 -> 2x1008 -> 2x496 -> 10x48 > 45-60: 2x2032 -> 2x1008 -> 2x496 -> 7x64 > 61-76: 2x2032 -> 2x1008 -> 2x496 -> 6x80 > 77-92: 2x2032 -> 2x1008 -> 2x496 -> 5x96 > 93-108: 2x2032 -> 2x1008 -> 2x496 -> 4x112 > 109-124: 2x2032 -> 2x1008 -> 7x128 > > 125-140: 2x2032 -> 2x1008 -> 7x144 > 141-156: 2x2032 -> 2x1008 -> 2x496 -> 3x160 > 157-188: 2x2032 -> 2x1008 -> 5x192 > 189-236: 2x2032 -> 2x1008 -> 2x496 -> 2x240 > > 237-272: 2x2032 -> 7x288 > 273-332: 2x2032 -> 2x1008 -> 3x336 These should read: 237-284: 2x2032 -> 7x288 285-332: 2x2032 -> 2x1008 -> 3x336 Not sure why I can't subtract 288-4...