Re: Safe memory allocation functions

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Safe memory allocation functions
Дата
Msg-id 20150116140851.GC21581@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Safe memory allocation functions  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 2015-01-16 08:47:10 +0900, Michael Paquier wrote:
> On Fri, Jan 16, 2015 at 12:57 AM, Alvaro Herrera
> <alvherre@2ndquadrant.com> wrote:
> >> I do think that "safe" is the wrong suffix.  Maybe palloc_soft_fail()
> >> or palloc_null() or palloc_no_oom() or palloc_unsafe().
> >
> > I liked palloc_noerror() better myself FWIW.
> Voting for palloc_noerror() as well.

I don't like that name. It very well can error out. E.g. because of the
allocation size. And we definitely do not want to ignore that case. How
about palloc_try()?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Safe memory allocation functions
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Safe memory allocation functions