To make a write position available, the function reallocates
(or initially allocates)
an array object with a sufficient number of elements
n to hold the current array object (if any),
plus at least one additional write position.

How many additional write positions are made
available is otherwise unspecified.

329
If palloc is not a null pointer, the function calls
(*palloc)(n)
to allocate the new dynamic array object.

Otherwise, if
the current write next pointer pnext is not a null pointer and
is greater than the current read end pointer gend,
makes a
read position
available by
assigning to gend a value greater than gnext and
no greater than pnext.