aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2024-02-28 14:20:43 +1300
committerDavid Rowley <drowley@postgresql.org>2024-02-28 14:20:43 +1300
commit413c18401dcc170636429127e2494d8beba4b92f (patch)
treea5016b8234352cda75b9464811bd0df81e87e779 /src/backend/access/transam/commit_ts.c
parentafd8ef39094b0dff9d1f2bfecb1d9fa056b85e19 (diff)
downloadpostgresql-413c18401dcc170636429127e2494d8beba4b92f.tar.gz
postgresql-413c18401dcc170636429127e2494d8beba4b92f.zip
Refactor AllocSetAlloc(), separating hot and cold paths
Allocating from a free list or from a block which contains enough space already, we deem to be common code paths and want to optimize for those. Having to allocate a new block, either a normal block or a dedicated one for a large allocation, we deem to be less common, therefore we class that as "cold". Both cold paths require a malloc so are going to be slower as a result of that regardless. The main motivation here is to remove the calls to malloc() in the hot path and because of this, the compiler is now free to not bother setting up the stack frame in AllocSetAlloc(), thus making the hot path much cheaper. Author: Andres Freund Reviewed-by: David Rowley Discussion: https://postgr.es/m/20210719195950.gavgs6ujzmjfaiig@alap3.anarazel.de
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
0 files changed, 0 insertions, 0 deletions