Re: Safe memory allocation functions - Mailing list pgsql-hackers

From David G Johnston
Subject Re: Safe memory allocation functions
Date
Msg-id 1421134127005-5833711.post@n5.nabble.com
Whole thread Raw
In response to Safe memory allocation functions  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Michael Paquier wrote
> Attached is a patch adding the following set of functions for frontend
> and backends returning NULL instead of reporting ERROR when allocation
> fails:
> - palloc_safe
> - palloc0_safe
> - repalloc_safe

The only thing I can contribute is paint...I'm not fond of the word "_safe"
and think "_try" would be more informative...in the spirit of try/catch as a
means of error handling/recovery.

David J.



--
View this message in context: http://postgresql.nabble.com/Safe-memory-allocation-functions-tp5833709p5833711.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Safe memory allocation functions
Next
From: Michael Paquier
Date:
Subject: Unused variables in hstore_to_jsonb