Re: patch: tsearch - some memory diet

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: patch: tsearch - some memory diet
Дата
Msg-id 4C866E16.7050604@sigaev.ru
обсуждение исходный текст
Ответ на Re: patch: tsearch - some memory diet  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
> A more general solution would be to have a new MemoryContext
> implementation that does the same your patch does. Ie. instead of
> tracking each allocation, just allocate a big chunk, and have palloc()
> return the next n free bytes from it, like a stack. pfree() would
> obviously not work, but wholesale MemoryContextDelete of the whole
> memory context would.

repalloc() will not work too. Such implementation should have possibility to 
debug memory allocation/management by using some kind of red-zones or 
CLOBBER_FREED_MEMORY/MEMORY_CONTEXT_CHECKING
-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: patch: tsearch - some memory diet
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: tsearch dictionary initialization hook