pgsql: Remove custom memory allocation layer in pgcrypto

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove custom memory allocation layer in pgcrypto
Date: 2020-09-25 01:27:03
Message-ID: E1kLcVr-0004Tm-OZ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove custom memory allocation layer in pgcrypto

PX_OWN_ALLOC was intended as a way to disable the use of palloc(), and
over the time new palloc() or equivalent calls have been added like in
32984d8, making this extra layer losing its original purpose. This
simplifies on the way some code paths to use palloc0() rather than
palloc() followed by memset(0).

Author: Daniel Gustafsson
Discussion: https://postgr.es/m/A5BFAA1A-B2E8-4CBC-895E-7B1B9475A527@yesql.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ca7f8e2b86e5f15a40b67e6199d714f45a467ff1

Modified Files
--------------
contrib/pgcrypto/imath.c | 10 +++++-----
contrib/pgcrypto/internal-sha2.c | 28 ++++++++++++----------------
contrib/pgcrypto/internal.c | 32 +++++++++++++-------------------
contrib/pgcrypto/mbuf.c | 30 ++++++++++++++----------------
contrib/pgcrypto/openssl.c | 8 ++++----
contrib/pgcrypto/pgp-cfb.c | 5 ++---
contrib/pgcrypto/pgp-compress.c | 18 ++++++++----------
contrib/pgcrypto/pgp-decrypt.c | 11 +++++------
contrib/pgcrypto/pgp-encrypt.c | 9 ++++-----
contrib/pgcrypto/pgp-mpi-internal.c | 6 +++---
contrib/pgcrypto/pgp-mpi.c | 4 ++--
contrib/pgcrypto/pgp-pubenc.c | 12 ++++++------
contrib/pgcrypto/pgp-pubkey.c | 5 ++---
contrib/pgcrypto/pgp.c | 5 ++---
contrib/pgcrypto/px-hmac.c | 21 ++++++++++-----------
contrib/pgcrypto/px.c | 32 ++++++++++++++------------------
contrib/pgcrypto/px.h | 13 -------------
17 files changed, 106 insertions(+), 143 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2020-09-25 07:05:12 pgsql: Defer flushing of SLRU files.
Previous Message Tom Lane 2020-09-24 22:20:02 pgsql: Fix handling of -d "connection string" in pg_dump/pg_restore.