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

2019-03-26 Thread Michael Paquier
On Tue, Mar 26, 2019 at 09:14:46AM +, 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().

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

2019-03-26 Thread Daniel Gustafsson
On Tuesday, March 26, 2019 9:00 AM, Michael Paquier wrote: > On Mon, Mar 25, 2019 at 01:18:05PM +, Daniel Gustafsson wrote: > > > When reading another codepath, I happened to notice a few codepaths where > > we do > > pg_malloc() immediately followed by a memset( .. 0, ..), without there >

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

2019-03-26 Thread Michael Paquier
On Mon, Mar 25, 2019 at 01:18:05PM +, Daniel Gustafsson wrote: > When reading another codepath, I happened to notice a few codepaths where we > do > pg_malloc() immediately followed by a memset( .. 0, ..), without there being > a > justification (that I can see) for not using pg_malloc0() in

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

2019-03-25 Thread Daniel Gustafsson
When reading another codepath, I happened to notice a few codepaths where we do pg_malloc() immediately followed by a memset( .. 0, ..), without there being a justification (that I can see) for not using pg_malloc0() instead. The attached patch changes to pg_malloc0(), and passes make check. chee