Re: Improving the memory allocator

Поиск
Список
Период
Сортировка
От Radosław Smogura
Тема Re: Improving the memory allocator
Дата
Msg-id 60216d868e5dc633d04f47203da50253@mail.softperience.eu
обсуждение исходный текст
Ответ на Improving the memory allocator  (Andres Freund <andres@anarazel.de>)
Ответы Re: Improving the memory allocator  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
I didn't followed this topic carefully, so sorry If I wrote something that was written, but I thought about following
approachat least for message sending, etc.:
 
1. When initializing MemoryContext (pool) give one parameter that will be stack size. Stack is addition to normal
operations.2.Operations on stack are only allocations, so alloc will be just pointer bump.3. When allocating memory for
messages,internally set size to be 1/3 greater (or 2/3 I don't remember well) for realloc, may help when encoding
changeoccurs.3. free is no op (as it was pointed), stack will be released or pointer resetted, when context is
released
From one point of view this may waste some memory (no free), but for messages should not happen, and even giving 100kb
ofmemory for stack may be quite enough, depending ofcourse how many data you send.
 
Regards,Radek


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

Предыдущее
От: Yves Weißig
Дата:
Сообщение: Re: operator classes for index?
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Proposal - asynchronous functions