Hi,
On Sat, Sep 26, 2020 at 12:14 AM Li Japin <japinli(at)hotmail(dot)com> wrote:
>
> Hi, hackers!
>
> I find the palloc0() is similar to the palloc(), we can use palloc() inside palloc0()
> to allocate space, thereby I think we can reduce duplication of code.
The code is duplicated on purpose. There's a comment at the beginning
that mentions it:
/* duplicates MemoryContextAllocZero to avoid increased overhead */
Same for MemoryContextAllocZero() itself.