From: | Maxim Orlov <orlovmg(at)gmail(dot)com> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment |
Date: | 2022-11-03 15:20:47 |
Message-ID: | CACG=ezYXoZFd-LVWsTTqdoGk6RnnmtsbJo+X+9TTgXQ+eT4x1Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi!
Part of the work that Thomas mentions in [1], regarding Direct I/O,
> has certain requirements that pointers must be page-aligned.
>
> I've attached a patch which implements palloc_aligned() and
> MemoryContextAllocAligned() ...
>
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.
--
Best regards,
Maxim Orlov.
Attachment | Content-Type | Size |
---|---|---|
v1-0002-Add-tests-for-palloc_aligned.patch | application/octet-stream | 4.3 KB |
v1-0001-palloc_aligned.patch | application/octet-stream | 12.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-11-03 15:29:04 | Re: [BUG] Logical replica crash if there was an error in a function. |
Previous Message | Tom Lane | 2022-11-03 14:50:18 | Re: Add explicit casts in four places to simplehash.h |