Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200410172152.GS11469@brightrain.aerifal.cx>
Date: Fri, 10 Apr 2020 13:21:52 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: 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...

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.