Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment - Mailing list pgsql-hackers

From David Rowley
Subject Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment
Date
Msg-id CAApHDvqPOE-YrB7S4Nz1rxNxVhgAyDGnBvE4jAFvFKBrA5+Z_A@mail.gmail.com
Whole thread Raw
In response to Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment  (Maxim Orlov <orlovmg@gmail.com>)
Responses Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment
List pgsql-hackers
On Fri, 4 Nov 2022 at 04:20, Maxim Orlov <orlovmg@gmail.com> wrote:
> I've done a quick look and the patch is looks good to me.
> Let's add tests for these functions, should we? If you think this is an overkill, feel free to trim tests for your
taste.

Thanks for doing that.  I'm keen to wait a bit and see if we can come
up with a core user of this before adding a test module.  However, if
we keep the repalloc() implementation, then I wonder if it might be
worth having a test module for that. I see you're not testing it in
the one you've written.  Andres has suggested I remove the repalloc
stuff I added but see my reply to that. I think we should keep it
based on the fact that someone using palloc_aligned might have no idea
if some other code path can call repalloc() on the returned pointer.

David



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment
Next
From: John Naylor
Date:
Subject: Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment