Use pg_memory_is_all_zeros() in pgstatfuncs.c.
Nathan Bossart <nathan@postgresql.org>
Use pg_memory_is_all_zeros() in pgstatfuncs.c. There are a few places in this file that use memset() and memcmp() to determine whether a section of memory is all zeros. This commit modifies them to use pg_memory_is_all_zeros() instead. These aren't expected to be hot code paths, but this may optimize them a bit. Plus, this allows us to remove some variables that were only needed for the memset() and memcmp(). Author: Bertrand Drouvot Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/Z1hNubHfvMxlW6eu%40ip-10-97-1-34.eu-west-3.compute.internal
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/pgstatfuncs.c | modified | +6 −12 |
Discussion
- Make use of pg_memory_is_all_zeros() in more places 4 messages · 2024-12-10 → 2024-12-11