Commit e8d5929
committed
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.internal1 parent 398d3e3 commit e8d5929
1 file changed
+6
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
365 | 364 | | |
366 | 365 | | |
367 | 366 | | |
| |||
483 | 482 | | |
484 | 483 | | |
485 | 484 | | |
486 | | - | |
487 | | - | |
488 | | - | |
| 485 | + | |
| 486 | + | |
489 | 487 | | |
490 | 488 | | |
491 | 489 | | |
| |||
880 | 878 | | |
881 | 879 | | |
882 | 880 | | |
883 | | - | |
884 | 881 | | |
885 | 882 | | |
886 | 883 | | |
| |||
891 | 888 | | |
892 | 889 | | |
893 | 890 | | |
894 | | - | |
895 | | - | |
896 | | - | |
| 891 | + | |
| 892 | + | |
897 | 893 | | |
898 | 894 | | |
899 | 895 | | |
| |||
925 | 921 | | |
926 | 922 | | |
927 | 923 | | |
928 | | - | |
929 | 924 | | |
930 | 925 | | |
931 | 926 | | |
| |||
936 | 931 | | |
937 | 932 | | |
938 | 933 | | |
939 | | - | |
940 | | - | |
941 | | - | |
| 934 | + | |
| 935 | + | |
942 | 936 | | |
943 | 937 | | |
944 | 938 | | |
| |||
0 commit comments