Re: not checking value returned from palloc?

From: Mark Dilger <pgsql(at)markdilger(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: not checking value returned from palloc?
Date: 2006-03-19 22:03:24
Message-ID: 441DD52C.9090001@markdilger.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-03-19 22:10:22 Re: not checking value returned from palloc?
Previous Message Tom Lane 2006-03-19 21:40:20 Re: not checking value returned from palloc?