Re: Which MemoryContext?
| От | Gevik Babakhani |
|---|---|
| Тема | Re: Which MemoryContext? |
| Дата | |
| Msg-id | 001601c87416$06dc9100$0a01a8c0@gevmus обсуждение исходный текст |
| Ответ на | Re: Which MemoryContext? ("Heikki Linnakangas" <heikki@enterprisedb.com>) |
| Ответы |
Re: Which MemoryContext?
|
| Список | pgsql-hackers |
> TopMemoryContext sounds right. Be careful not to leak there. Thank you :) I have allocated memory using: MemoryContextAlloc(TopMemoryContext,n * sizeof(char*)); In pgsql/src/backend/utils/mmgr/README:142 is stated that memory allocated using above should be freed manually, Is this correct? Or does the system release everything allocated in TopMemoryContext automatically when exiting? I looked around and found examples where memory allocated using above is not freed! (datetime.c:3811, uhhh.. a bit confused here) Any thoughts? Regards, Gevik.
В списке pgsql-hackers по дате отправления: