Re: change palloc to malloc

Поиск
Список
Период
Сортировка
От Karel Zak
Тема Re: change palloc to malloc
Дата
Msg-id 1111053388.4169.247.camel@petra
обсуждение исходный текст
Ответ на Re: change palloc to malloc  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On Tue, 2005-03-15 at 18:29 -0500, Bruce Momjian wrote:
> Nguyen Hai wrote:
> > Hi,
> > 
> > Is it possible to convert palloc back to malloc?
> > If so, what should I do to make the change?
> 
> You can, but palloc is automatically freed at the end of a query, while
> malloc has to be freed in the code.  Why do you want to make the
> switch?

Right. And it's definitely faster use palloc() than malloc(). I think
the current code is really based on memory contexts and I'm sure that
(strange:-) s/palloc/malloc/ is not enough. 
Karel 
-- 
Karel Zak <zakkr@zf.jcu.cz>



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: read-only database
Следующее
От: Karel Zak
Дата:
Сообщение: Re: invalidating cached plans