Re: Memory leak in vac_update_relstats ?
От | NikhilS |
---|---|
Тема | Re: Memory leak in vac_update_relstats ? |
Дата | |
Msg-id | d3c4af540707200317n25b26ef1if3e364680dcd60b4@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Memory leak in vac_update_relstats ? (Heikki Linnakangas <heikki@enterprisedb.com>) |
Ответы |
Re: Memory leak in vac_update_relstats ?
|
Список | pgsql-hackers |
Hi,
That's the beauty of memory contexts for small allocations. But because of the 'convenience' of memory contexts we sometimes tend to not pay attention to doing explicit pfrees. As a general rule I think allocations in TopMemoryContext should be critically examined. I was bitten by this undue bloat recently while developing some code and valgrind is not of much help in such cases because of this very beauty of memory contexts :).
Regards,
Nikhils
--
EnterpriseDB http://www.enterprisedb.com
It's palloc'd in the current memory context, so it's not serious. It'll
be freed at the end of the transaction, if not before that. That's the
beauty of memory contexts; no need to worry about small allocations like
that.
Regards,
Nikhils
--
EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: