pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: Petr Jelinek <petr@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: John Gorman <johngorman2@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: PATCH: two slab-like memory allocators
Date: Tue, 28 Feb 2017 00:29:44 -0500
Message-ID: <1671.1488259784@sss.pgh.pa.us> (raw)
In-Reply-To: <20170228051630.3qcevakcaaa6b4ef@alap3.anarazel.de>
References: <20170227111732.vrx5v72ighehwpkf@alap3.anarazel.de>
	<20170227120200.5jc3ubg5jrqaznd7@alap3.anarazel.de>
	<26061.1488209545@sss.pgh.pa.us>
	<20170227155532.o7casczq5parlmz4@alap3.anarazel.de>
	<20170227164828.akgzeg6ggl2v4x7s@alap3.anarazel.de>
	<12622.1488216468@sss.pgh.pa.us>
	<20170227174201.yrofai7neyp6shb2@alap3.anarazel.de>
	<c7c1bb85-d1d0-05a5-4d4c-3047d6f053e7@2ndquadrant.com>
	<20170228034232.4h7ouyhxq4lbbao2@alap3.anarazel.de>
	<1240.1488254244@sss.pgh.pa.us>
	<20170228051630.3qcevakcaaa6b4ef@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andres Freund <andres@anarazel.de> writes:
> Hm, that should be doable with something like
> #if MAXIMUM_ALIGNOF > 4 && SIZEOF_VOID_P == 4
> which'd probably be better documentation than a macro that hides this
> (arguing internally whether SIZEOF_VOID_P or SIZEOF_SIZE_T) is better.

Not sure either, but suggest we add a StaticAssert asserting there's no
padding; something along the lines of
	offsetof(AllocSetChunkHeader, context) + sizeof(MemoryContext) == MAXALIGN(sizeof(AllocSetChunkHeader))

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (97+ messages)  latest in thread

Message-ID: <1671.1488259784@sss.pgh.pa.us>
Permalink:  ../1671.1488259784@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1671.1488259784@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, tomas.vondra@2ndquadrant.com, petr.jelinek@2ndquadrant.com, petr@2ndquadrant.com, robertmhaas@gmail.com, johngorman2@gmail.com
  Subject: Re: PATCH: two slab-like memory allocators
  In-Reply-To: <1671.1488259784@sss.pgh.pa.us>

* 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