mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [musl] Concrete case-by-case examples of mallocng @ low usage
Date: Fri, 10 Apr 2020 13:21:52 -0400	[thread overview]
Message-ID: <20200410172152.GS11469@brightrain.aerifal.cx> (raw)
In-Reply-To: <20200410170407.GQ11469@brightrain.aerifal.cx>

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...

  reply	other threads:[~2020-04-10 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08  2:32 [musl] "Expected behavior" for " Rich Felker
2020-04-10 15:48 ` Rich Felker
2020-04-10 17:04   ` [musl] Concrete case-by-case examples of " Rich Felker
2020-04-10 17:21     ` Rich Felker [this message]
2020-05-03  3:03     ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200410172152.GS11469@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).