From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Reducing the chunk header sizes on all memory context types |
Date: | 2022-08-30 03:01:37 |
Message-ID: | CAApHDvomyTrKGXU4PVnUEeauaNgjRppJ2Myb+MwWMU47was6Qg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 30 Aug 2022 at 03:39, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I'd suggest reverting df0f4feef as it seems to be
> a red herring.
I think it's useless providing that a 64-bit variable will always be
aligned to 8 bytes on all of our supported 32-bit platforms as,
without the padding, the uint64 hdrmask in MemoryChunk will always be
aligned to 8 bytes meaning the memory following that will be aligned
too. If we have a platform where a uint64 isn't aligned to 8 bytes
then we might need the padding.
long long seems to align to 8 bytes on my 32-bit Rasberry PI going the
struct being 16 bytes rather than 12.
drowley(at)raspberrypi:~ $ cat struct.c
#include <stdio.h>
typedef struct test
{
int a;
long long b;
} test;
int main(void)
{
printf("%d\n", sizeof(test));
return 0;
}
drowley(at)raspberrypi:~ $ gcc struct.c -o struct
drowley(at)raspberrypi:~ $ ./struct
16
drowley(at)raspberrypi:~ $ uname -m
armv7l
Is that the case for your 32-bit PPC too?
David
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-08-30 03:08:17 | Re: configure openldap crash warning |
Previous Message | John Naylor | 2022-08-30 02:51:31 | Re: use ARM intrinsics in pg_lfind32() where available |