From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Switch some palloc/memset calls to palloc0
Date: Wed, 27 Mar 2019 03:03:10 +0000
Message-ID: <E1h8yqM-0001nj-R9@gemulon.postgresql.org> (raw)
Switch some palloc/memset calls to palloc0
Some code paths have been doing some allocations followed by an
immediate memset() to initialize the allocated area with zeros, this is
a bit overkill as there are already interfaces to do both things in one
call.
Author: Daniel Gustafsson
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/vN0OodBPkKs7g2Z1uyk3CUEmhdtspHgYCImhlmSxv1Xn6nY1ZnaaGHL8EWUIQ-NEv36tyc4G5-uA3UXU...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1983af8e899389187026cb34c1ca9d89ea986120
Modified Files
--------------
contrib/tablefunc/tablefunc.c | 7 ++-----
src/backend/access/gist/gist.c | 3 +--
src/bin/pg_dump/pg_backup_archiver.c | 3 +--
src/bin/pg_dump/pg_dump_sort.c | 3 +--
src/bin/pgbench/pgbench.c | 3 +--
5 files changed, 6 insertions(+), 13 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Switch some palloc/memset calls to palloc0
In-Reply-To: <E1h8yqM-0001nj-R9@gemulon.postgresql.org>
References: <E1h8yqM-0001nj-R9@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox