Re: Question about the MemoryContext

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question about the MemoryContext
Дата
Msg-id 9166.1145744173@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Question about the MemoryContext  (Gevik Babakhani <pgdev@xs4all.nl>)
Ответы Re: Question about the MemoryContext  (Gevik Babakhani <pgdev@xs4all.nl>)
Список pgsql-hackers
Gevik Babakhani <pgdev@xs4all.nl> writes:
> Could someone please explain the MemoryContext switching. For example
> MemoryContextSwitchTo function. How does this work?

src/backend/utils/mmgr/README might help.  It's somewhat pointed at
people who've already been hacking the backend, but I think it will
give you the idea.

The basic point is that palloc() allocates memory in whichever context
was last selected as CurrentMemoryContext by MemoryContextSwitchTo.
        regards, tom lane


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

Предыдущее
От: daveg
Дата:
Сообщение: Re: [PATCHES] Automatically setting work_mem
Следующее
От: Gevik Babakhani
Дата:
Сообщение: Re: Question about the MemoryContext