Re: [PATCH] Use MemoryContextAlloc() in the MemoryContextAllocZero() and MemoryContextAllocZeroAligned()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexander Kuleshov <kuleshovmail(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Use MemoryContextAlloc() in the MemoryContextAllocZero() and MemoryContextAllocZeroAligned()
Date: 2016-03-12 16:10:52
Message-ID: 13968.1457799052@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alexander Kuleshov <kuleshovmail(at)gmail(dot)com> writes:
> Attached patch simplifies the MemoryContextAllocZero() and
> MemoryContextAllocZeroAligned().

What this does is to de-inline those functions, resulting in an
extra level of function call per allocation. We had intentionally
inlined them on performance grounds: those things are hot spots in
most workloads. Do you have any evidence demonstrating that this
doesn't cause a performance hit?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Salvador Fandiño 2016-03-12 16:24:07 Re: Perl's newSViv() versus 64-bit ints?
Previous Message Tom Lane 2016-03-12 16:06:01 Re: eXtensible Transaction Manager API (v2)