postgresql/src
David Rowley a0cd954480 Optimize GenerationAlloc() and SlabAlloc()
In a similar effort to 413c18401, separate out the hot and cold paths in
GenerationAlloc() and SlabAlloc() to avoid having to setup the stack frame
for the hot path.

This additionally adjusts how we use the GenerationContext's freeblock.
Freeblock, when set, is now always empty and we only switch to using it
when the current allocation request finds the current block does not have
enough space and the freeblock is large enough to accomodate the
allocation.

This commit also adjusts GenerationFree() so that if we pfree the final
allocation in the current generation block, we now mark that block as
empty and keep it as the current block.  Previously we free'd that block
and set the current block to NULL.  Doing that meant we needed a special
case in GenerationAlloc to check if GenerationContext.block was NULL.
So this both reduces free/malloc calls and reduces the work done in
GenerationAlloc().

In passing, improve some comments in aset.c

Discussion: https://postgr.es/m/CAApHDvpHVSJqqb4B4OZLixr=CotKq-eKkbwZqvZVo_biYvUvQA@mail.gmail.com
2024-03-04 17:42:10 +13:00
..
backend Optimize GenerationAlloc() and SlabAlloc() 2024-03-04 17:42:10 +13:00
bin Support MERGE into updatable views. 2024-02-29 15:56:59 +00:00
common Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
fe_utils Centralize logic for restoring errno in signal handlers. 2024-02-14 16:34:18 -06:00
include Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
interfaces Remove AIX support 2024-02-28 15:17:23 +04:00
makefiles Remove AIX support 2024-02-28 15:17:23 +04:00
pl Redefine backend ID to be an index into the proc array 2024-03-03 19:37:28 +02:00
port Fix overflow in Windows replacement pg_pread/pg_pwrite. 2024-03-03 08:40:41 +13:00
template Remove AIX support 2024-02-28 15:17:23 +04:00
test Support partition pruning on boolcol IS [NOT] UNKNOWN 2024-03-04 14:40:22 +13:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools injection_points: Add wait and wakeup of processes 2024-03-04 09:19:13 +09:00
tutorial Update copyright for 2024 2024-01-03 20:49:05 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Remove make function vpathsearch 2024-01-29 07:24:59 +01:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00