Skip site navigation (1) Skip section navigation (2)

Re: xmalloc => pg_malloc

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: xmalloc => pg_malloc
Date: 2012-10-02 16:21:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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(at)momjian(dot)us>

  + It's impossible for everything to be true. +

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-10-02 16:30:33
Subject: Re: xmalloc => pg_malloc
Previous:From: Andres FreundDate: 2012-10-02 16:19:13
Subject: Re: xmalloc => pg_malloc

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group