Re: [HACKERS] PATCH: two slab-like memory allocators - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] PATCH: two slab-like memory allocators
Date
Msg-id 1671.1488259784@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] PATCH: two slab-like memory allocators  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] PATCH: two slab-like memory allocators
List pgsql-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 ofoffsetof(AllocSetChunkHeader, context) + sizeof(MemoryContext) ==
MAXALIGN(sizeof(AllocSetChunkHeader))
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: [HACKERS] avoid bloat from CREATE INDEX CONCURRENTLY
Next
From: Kuntal Ghosh
Date:
Subject: [HACKERS] WAL Consistency checking for hash indexes