Re: [HACKERS] PATCH: two slab-like memory allocators

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] PATCH: two slab-like memory allocators
Дата
Msg-id 1671.1488259784@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] PATCH: two slab-like memory allocators  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] PATCH: two slab-like memory allocators  (Andres Freund <andres@anarazel.de>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: [HACKERS] avoid bloat from CREATE INDEX CONCURRENTLY
Следующее
От: Kuntal Ghosh
Дата:
Сообщение: [HACKERS] WAL Consistency checking for hash indexes