From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Mostly-cosmetic improvements in memory chunk header alignment co
Date: Fri, 24 Nov 2017 20:50:31 +0000
Message-ID: <E1eIKvf-0005gJ-PC@gemulon.postgresql.org> (raw)
Mostly-cosmetic improvements in memory chunk header alignment coding.
Add commentary about what we're doing and why. Apply the method used for
padding in GenerationChunk to AllocChunkData, replacing the rather ad-hoc
solution used in commit 7e3aa03b4. Reorder fields in GenerationChunk so
that the padding calculation will work even if sizeof(size_t) is different
from sizeof(void *) --- likely that will never happen, but we don't need
the assumption if we do it like this. Improve static assertions about
alignment.
In passing, fix a couple of oversights in the "large chunk" path in
GenerationAlloc().
Discussion: https://postgr.es/m/E1eHa4J-0006hI-Q8@gemulon.postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f65d21b258085bdc8ef2cc282ab1ff12da9c595c
Modified Files
--------------
src/backend/utils/mmgr/aset.c | 25 ++++++++++++----
src/backend/utils/mmgr/generation.c | 58 +++++++++++++++++--------------------
src/backend/utils/mmgr/slab.c | 21 ++++++++++----
3 files changed, 62 insertions(+), 42 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Mostly-cosmetic improvements in memory chunk header alignment co
In-Reply-To: <E1eIKvf-0005gJ-PC@gemulon.postgresql.org>
References: <E1eIKvf-0005gJ-PC@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox