Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment
От
Andres Freund
Тема
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment
Дата
Msg-id
20221114221143.sadq6mat3kf3oeal@awork3.anarazel.de
Ответ на
Список
Дерево обсуждения
Add palloc_aligned() to allow arbitrary power of 2 memory alignment David Rowley <dgrowleyml@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment Andres Freund <andres@anarazel.de>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment David Rowley <dgrowleyml@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment Andres Freund <andres@anarazel.de>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment David Rowley <dgrowleyml@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment Andres Freund <andres@anarazel.de>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment David Rowley <dgrowleyml@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment David Rowley <dgrowleyml@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment David Rowley <dgrowleyml@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment John Naylor <john.naylor@enterprisedb.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment David Rowley <dgrowleyml@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment John Naylor <john.naylor@enterprisedb.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment David Rowley <dgrowleyml@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment Maxim Orlov <orlovmg@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment David Rowley <dgrowleyml@gmail.com>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment Andres Freund <andres@anarazel.de>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment Greg Stark <stark@mit.edu>
Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment Andres Freund <andres@anarazel.de>
Hi, On 2022-11-08 14:57:35 +1300, David Rowley wrote: > On Tue, 8 Nov 2022 at 05:24, Andres Freund wrote: > > Should we handle the case where we get a suitably aligned pointer from > > MemoryContextAllocExtended() differently? > > Maybe it would be worth the extra check. I'm trying to imagine future > use cases. Maybe if someone wanted to ensure that we're aligned to > CPU cache line boundaries then the chances of the pointer already > being aligned to 64 bytes is decent enough. The problem is it that > it's too late to save any memory, it just saves a bit of boxing and > unboxing of the redirect headers. Couldn't we reduce the amount of over-allocation by a small amount by special casing the already-aligned case? That's not going to be relevant for page size aligne allocations, but for smaller alignment values it could matter. Greetings, Andres Freund
В списке pgsql-hackers по дате отправления