Hi Robert,
You have a small typo in the patch:
+ /*
+ * pagesize will, for practical purposes, always be a power of two.
+ * But just in case it isn't, we do it this way instead of using
+ * TYPEALIGN().
+ */
+ AnonymousShmemSize = size;
+ if (size % pagesize != 0)
+ AnonymousShmemSize += pagesize - (size % pagesize);
+
+ /*
+ * We assume that no one will attempt to run PostgreSQL 9.3 or later
+ * on systems that are ancient enough that anonymous shared memory is
+ * not supported, such as pre-2.4 versions of Linux. If that turns
out
+ * to be false, we might need to add a run-time test here and do this
+ * only if the running kernel supports it.
+ */
+ AnonymousShmem = mmap(NULL, size, PROT_READ|PROT_WRITE, PG_MMAP_FLAGS,
+ -1, 0);
Note that you use size in the mmap...
Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services