On 13.02.26 09:03, Bertrand Drouvot wrote:
+/*
+ * If compiler understands aligned pragma, use it to align the struct at cache
+ * line boundaries.  This is just for performance, to (a) avoid false sharing
+ * and (b) to make the multiplication / division to convert between PGPROC *
+ * and ProcNumber be a little cheaper.
+ */
+#if defined(pg_attribute_aligned)
+                       pg_attribute_aligned(PG_CACHE_LINE_SIZE)
+#endif
+PGPROC;

You can/should use C11 standard alignas(), so you don't need to worry about whether it's supported or not.



Reply via email to