Re: pg_malloc0() instead of pg_malloc()+memset()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_malloc0() instead of pg_malloc()+memset()
Date: 2019-03-27 03:04:14
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Mar 26, 2019 at 09:14:46AM +0000, Daniel Gustafsson wrote:
> Nice, I had missed them as I my eyes set on pg_malloc(). I've done another pass over
> the codebase and I can't spot any other on top of the additional ones you found where
> MemSet() in palloc0 is preferrable over memset().

Same here, committed. Just for the note, I have been just using git
grep -A to look at the follow-up lines of any allocation calls.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-03-27 03:06:04 Re: speeding up planning with partitions
Previous Message Michael Paquier 2019-03-27 02:56:20 Re: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table