Re: not checking value returned from palloc?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: not checking value returned from palloc?
Дата
Msg-id 20060319221022.GA5357@surnet.cl
обсуждение исходный текст
Ответ на Re: not checking value returned from palloc?  (Mark Dilger <pgsql@markdilger.com>)
Ответы Re: not checking value returned from palloc?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Mark Dilger wrote:
> Peter Eisentraut wrote:
> >Mark Dilger wrote:
> >
> >>Looking through the postgresql source code, I notice that there are
> >>many places were palloc is used but the return value is not checked
> >>to see if it is null.
> >
> >palloc will throw an exception if it cannot fulfill the request.  Code 
> >that checks the return value for null is in fact a waste.
> 
> Interesting.  So the patch should go the other way, and remove the checks 
> that are currently in the code?

Yes, if you find any such place please submit a patch.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: not checking value returned from palloc?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: not checking value returned from palloc?