Skip site navigation (1) Skip section navigation (2)

Re: PATCH: two slab-like memory allocators

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>,Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>,Petr Jelinek <petr(at)2ndquadrant(dot)com>,Robert Haas <robertmhaas(at)gmail(dot)com>,John Gorman <johngorman2(at)gmail(dot)com>,pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: two slab-like memory allocators
Date: 2017-02-28 07:44:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

*preliminary* patch attached. This needs a good bit of polishing
(primarily comment work, verifying that valgrind works), but I'm too
tired now.

I'm not quite sure how to deal with mmgr/README - it's written as kind
of a historical document, and the "Mechanisms to Allow Multiple Types of
Contexts" is already quite out of date.  I think it'd be good to rip out
all the historical references and just describe the current state, but
I'm not really enthusiastic about tackling that :/

On 2017-02-28 00:29:44 -0500, Tom Lane wrote:
> 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))


With Craig's help I've verified that the patch as attached works on a
platform that's currently failing. Thanks!

- Andres

Attachment: 0001-Remove-StandardChunkHeader-for-Slab-s-benefit.patch
Description: text/x-patch (19.0 KB)

In response to


pgsql-hackers by date

Next:From: Masahiko SawadaDate: 2017-02-28 07:54:07
Subject: Re: Transactions involving multiple postgres foreign servers
Previous:From: Masahiko SawadaDate: 2017-02-28 07:40:28
Subject: Re: Report the number of skipped frozen pages by manual VACUUM

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group