Re: Reducing the chunk header sizes on all memory context types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Reducing the chunk header sizes on all memory context types
Дата
Msg-id 3209100.1661787561@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Reducing the chunk header sizes on all memory context types  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Reducing the chunk header sizes on all memory context types  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
Got it: sizeof(SlabBlock) isn't a multiple of MAXALIGN,

(gdb) p sizeof(SlabBlock)
$4 = 20

but this coding requires it to be:

#define SlabBlockGetChunk(slab, block, idx) \
    ((MemoryChunk *) ((char *) (block) + sizeof(SlabBlock)    \
                    + (idx * slab->fullChunkSize)))

So what you actually need to do is add some alignment padding to
SlabBlock.  I'd suggest reverting df0f4feef as it seems to be
a red herring.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Reducing the chunk header sizes on all memory context types
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Reducing the chunk header sizes on all memory context types