Re: malloc: change chunk sizes to be multiple of 16 instead of power of 2

2023-03-07 Thread Otto Moerbeek
On Tue, Mar 07, 2023 at 09:02:04AM +0100, Theo Buehler wrote: > > So here's the dif with the fix. > > The new diff went through an amd64 bulk without fallout and also works > fine on some dev machines. No noticeable performance impact for my > workloads. > > It also reads fine to me (ok tb). >

Re: malloc: change chunk sizes to be multiple of 16 instead of power of 2

2023-03-07 Thread Theo Buehler
> So here's the dif with the fix. The new diff went through an amd64 bulk without fallout and also works fine on some dev machines. No noticeable performance impact for my workloads. It also reads fine to me (ok tb). Do you want it to make it into the release or can/should it wait? Either way, i

Re: malloc: change chunk sizes to be multiple of 16 instead of power of 2

2023-03-01 Thread Otto Moerbeek
On Wed, Mar 01, 2023 at 08:49:56AM +0100, Theo Buehler wrote: > On Wed, Mar 01, 2023 at 08:39:08AM +0100, Otto Moerbeek wrote: > > On Wed, Mar 01, 2023 at 08:31:47AM +0100, Theo Buehler wrote: > > > > > On Tue, Feb 28, 2023 at 05:52:28PM +0100, Otto Moerbeek wrote: > > > > Second iteration. > > >

Re: malloc: change chunk sizes to be multiple of 16 instead of power of 2

2023-02-28 Thread Theo Buehler
On Wed, Mar 01, 2023 at 08:39:08AM +0100, Otto Moerbeek wrote: > On Wed, Mar 01, 2023 at 08:31:47AM +0100, Theo Buehler wrote: > > > On Tue, Feb 28, 2023 at 05:52:28PM +0100, Otto Moerbeek wrote: > > > Second iteration. > > > > > > Gain back performance by allocation chunk_info pages in a bundle,

Re: malloc: change chunk sizes to be multiple of 16 instead of power of 2

2023-02-28 Thread Otto Moerbeek
On Wed, Mar 01, 2023 at 08:31:47AM +0100, Theo Buehler wrote: > On Tue, Feb 28, 2023 at 05:52:28PM +0100, Otto Moerbeek wrote: > > Second iteration. > > > > Gain back performance by allocation chunk_info pages in a bundle, and > > use less buckets is !malloc option S. The chunk sizes used are 16,

Re: malloc: change chunk sizes to be multiple of 16 instead of power of 2

2023-02-28 Thread Theo Buehler
On Tue, Feb 28, 2023 at 05:52:28PM +0100, Otto Moerbeek wrote: > Second iteration. > > Gain back performance by allocation chunk_info pages in a bundle, and > use less buckets is !malloc option S. The chunk sizes used are 16, 32, > 48, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512,

Re: malloc: change chunk sizes to be multiple of 16 instead of power of 2

2023-02-28 Thread Otto Moerbeek
Second iteration. Gain back performance by allocation chunk_info pages in a bundle, and use less buckets is !malloc option S. The chunk sizes used are 16, 32, 48, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048 (and a few more for sparc84 w

malloc: change chunk sizes to be multiple of 16 instead of power of 2

2023-02-23 Thread Otto Moerbeek
Hi, The basic idea is simple: one of the reasons the recent sshd bug is potentially exploitable is that a (erroneously) freed malloc chunk gets re-used in a different role. My malloc has power of two chunk sizes and so one page of chunks holds many different types of allocations. Userland malloc h