[PATCH] Use MemoryContextAlloc() in the MemoryContextAllocZero() and MemoryContextAllocZeroAligned() - Mailing list pgsql-hackers

From Alexander Kuleshov
Subject [PATCH] Use MemoryContextAlloc() in the MemoryContextAllocZero() and MemoryContextAllocZeroAligned()
Date
Msg-id CANCZXo5+rDtcoghEs=0_Qoxis7cB6jh7MwhLZm2_DwpEaE6Opw@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Use MemoryContextAlloc() in the MemoryContextAllocZero() and MemoryContextAllocZeroAligned()
Re: [PATCH] Use MemoryContextAlloc() in the MemoryContextAllocZero() and MemoryContextAllocZeroAligned()
List pgsql-hackers
Hello all,

Attached patch simplifies the MemoryContextAllocZero() and
MemoryContextAllocZeroAligned().
The MemoryContextAllocZero() and MemoryContextAllocZeroAligned()
functions does almost the
same that MemoryContextAlloc() does. Additionally these functions
fills allocated memory context
with zeros via MemSetAligned() and MemSetLoop(). Let's call
MemoryContextAlloc() in these functions
instead of setting isReset to false, call alloc() callback of the
context and etc., to prevent code duplication.

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Explain [Analyze] produces parallel scan for select Into table statements.
Next
From: Salvador Fandiño
Date:
Subject: Re: Perl's newSViv() versus 64-bit ints?