Re: Which MemoryContext?

Поиск
Список
Период
Сортировка
От Gevik Babakhani
Тема Re: Which MemoryContext?
Дата
Msg-id 004801c87460$7358eff0$0a01a8c0@gevmus
обсуждение исходный текст
Ответ на Re: Which MemoryContext?  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
> All local memory is safe to handle that way.  
In my case I am reallocating memory for a global variable between
transactions. I wanted to make sure I don't leave allocated memory behind.

> The problem only arises when you have memory to release _earlier_ than
that.
First I was looking for a way to free my allocated memory before exit. I
found the proc_exit hook mechanism but I am not sure where to setup this
hook.

Given allocating memory in TopMemoryContext is the same as malloc, then I'll
just leave my allocated memory to be freed automatically when exit.

Thank you :)

Regards,
Gevik 







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

Предыдущее
От: "Peter Childs"
Дата:
Сообщение: Re: Permanent settings
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: VARATT_EXTERNAL_GET_POINTER is not quite there yet