Re: SlabCheck leaks memory into TopMemoryContext

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SlabCheck leaks memory into TopMemoryContext
Дата
Msg-id 23952.1579151393@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SlabCheck leaks memory into TopMemoryContext  (Andres Freund <andres@anarazel.de>)
Ответы Re: SlabCheck leaks memory into TopMemoryContext
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> I just noticed that having a slab context around in an assertion build
> leads to performance degrading and memory usage going up. A bit of
> poking revealed that SlabCheck() doesn't free the freechunks it
> allocates.

> It's on its own obviously trivial to fix.

It seems like having a context check function do new allocations
is something to be avoided in the first place.  It's basically assuming
that the memory management mechanism is sane, which makes the whole thing
fundamentally circular, even if it's relying on some other context to be
sane.  Is there a way to do the checking without extra allocations?

            regards, tom lane



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

Предыдущее
От: Amit Khandekar
Дата:
Сообщение: Re: Minimal logical decoding on standbys
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum