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: Mon, 27 Feb 2017 12:27:48 -0500
Message-ID: <12622.1488216468@sss.pgh.pa.us> (raw)
In-Reply-To: <20170227164828.akgzeg6ggl2v4x7s@alap3.anarazel.de>
References: <20170211013337.iw32bvfqwta634wy@alap3.anarazel.de>
	<53def906-2197-bc06-b987-d237f9574800@2ndquadrant.com>
	<20170214022221.obhdeyfn34h6hkwj@alap3.anarazel.de>
	<19464ac8-e66b-3598-858f-29c749bec35a@2ndquadrant.com>
	<b3b2245c-b37a-e1e5-ebc4-857c914bc747@2ndquadrant.com>
	<20170224221038.43xf2cyonczzr6hb@alap3.anarazel.de>
	<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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andres Freund <andres@anarazel.de> writes:
> The best theory I have so far that I have is that slab.c's idea of
> StandardChunkHeader's size doesn't match what mcxt.c think it is
> (because slab.c simply embeds StandardChunkHeader, but mcxt uses
> MAXALIGN(sizeof(StandardChunkHeader))).  That's not good, but I don't
> quite see how that'd cause the issue, since StandardChunkHeader's size
> should always be properly sized.

Uh, wrong.  On a 32-bit machine with debug enabled, StandardChunkHeader
will contain 3 4-byte fields.  However, there are some such machines on
which MAXALIGN is 8.  For example, looking at termite's configure
output:

checking size of void *... 4
checking size of size_t... 4
checking size of long... 4
checking alignment of short... 2
checking alignment of int... 4
checking alignment of long... 4
checking alignment of long long int... 8
checking alignment of double... 8

axolotl's output looks similar.  I expect my old HPPA dinosaur
will show the failure as well.

			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: <12622.1488216468@sss.pgh.pa.us>
Permalink:  ../12622.1488216468@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12622.1488216468@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: <12622.1488216468@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