Re: xmalloc => pg_malloc

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: xmalloc => pg_malloc
Дата
Msg-id 20121002162134.GF30089@momjian.us
обсуждение исходный текст
Ответ на xmalloc => pg_malloc  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Oct  2, 2012 at 12:02:13PM -0400, Tom Lane wrote:
> While looking around to fix the pg_malloc(0) issue, I noticed that
> various other pieces of code such as pg_basebackup have essentially
> identical functions, except they're called xmalloc().  I propose to
> standardize all these things on this set of names:
> 
>     pg_malloc
>     pg_malloc0    (for malloc-and-zero behavior)
>     pg_calloc    (randomly different API for pg_malloc0)
>     pg_realloc
>     pg_free
>     pg_strdup
> 
> Any objections?

Please standarize.  I am totally confused by the many memory
implementations we have.  (Pg_upgrade uses pg_malloc().)

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: xmalloc => pg_malloc
Следующее
От: Tom Lane
Дата:
Сообщение: Re: xmalloc => pg_malloc