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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Reducing the chunk header sizes on all memory context types
Дата
Msg-id CAApHDvoKg1Nf1GZgaL9WeS+srja2+UBgFxjYDkO-A2_XHbfU-A@mail.gmail.com
обсуждение исходный текст
Ответ на 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  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, 1 Sept 2022 at 12:23, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Is there reason to think we can't validate headers enough to catch
> clobbers?

For non-sentinel chunks, the next byte after the end of the chunk will
be storing the block offset for the following chunk.  I think:

if (block != MemoryChunkGetBlock(chunk))
elog(WARNING, "problem in alloc set %s: bad block offset for chunk %p
in block %p",
name, chunk, block);

should catch those.

Maybe we should just consider always making room for a sentinel for
chunks that are on dedicated blocks. At most that's an extra 8 bytes
in some allocation that's either over 1024 or 8192 (depending on
maxBlockSize).

David



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Reducing the chunk header sizes on all memory context types
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [PATCH] Add native windows on arm64 support