Re: not checking value returned from palloc?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: not checking value returned from palloc?
Дата
Msg-id 200603192214.k2JMEXZ14227@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: not checking value returned from palloc?  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: not checking value returned from palloc?  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
Alvaro Herrera wrote:
> 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.

I see one in cash.c that I will remove.

--  Bruce Momjian   http://candle.pha.pa.us SRA OSS, Inc.   http://www.sraoss.com
 + If your life is a hard drive, Christ can be your backup. +


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: not checking value returned from palloc?
Следующее
От: Neil Conway
Дата:
Сообщение: Re: not checking value returned from palloc?