@@ -128,7 +128,7 @@ typedef long nmbrString; /* String of numbers */
128
128
* pointer. If this array is held in a \ref block, its size can also be
129
129
* determined from its header's administrative data. Both values must be kept
130
130
* synchronized. In early phases of memory allocation, when data wasn't
131
- * assigned yet, this need not hold.
131
+ * assigned yet, this need not hold, though .
132
132
*
133
133
* To summarize the usages of this type:
134
134
* - If you want to resize the array/stack you need a pointer to element 0.
@@ -728,21 +728,31 @@ temp_pntrString *pntrMakeTempAlloc(pntrString *s);
728
728
* reallocated, and if it is, it gets twice the needed size to account for
729
729
* future growing. If the \p target block is only partially used after copy it
730
730
* is added to the \ref memUsedPool. If \p source is empty, the \p target is
731
- *
731
+ * to \ref NULL_PNTRSTRING.
732
+ * \n
733
+ * It is assumed that the value persisted in \p target is in fact computed from
734
+ * temporary operands in \ref pntrTempAllocStack. All blocks starting with
735
+ * the element at \ref g_pntrTempAllocStackStart are returned to the
736
+ * \ref memFreePool.
737
+ * \attention freed \ref block "blocks" contain \ref pntrString instances.
738
+ * See \ref pntrTempAllocStack to learn how this free process can be
739
+ * dangerous if no precautions are taken.
732
740
* \param[in,out] target (not null) the address of a pointer pointing to the
733
741
* first byte of a \ref block receiving the copied elements of \p source.
734
742
* \param[in] source (not null) a pointer to the first \ref pntrString element
735
743
* in a \ref block, to be copied from.
736
744
* \pre
737
- * - source does not contain NULL pointer , but is terminated by one. This
738
- * NULL pointer is not part of the array, but must be present.
745
+ * - source does not contain NULL pointerelements , but is terminated by one.
746
+ * This final NULL pointer is not part of the array, but must be present.
739
747
* - the target \ref block does not contain any valuable data.
740
748
* \post
741
749
* - the \ref block \p target points to is filled with a copy of
742
750
* \ref pntrString elements \p source points to, padded with a terminal
743
751
* NULL.
744
752
* - due to a possible reallocation the pointer \p target points to may
745
753
* change.
754
+ * - The stack pointer of \ref pntrTempAllocStack is reset to
755
+ * \ref g_pntrTempAllocStackStart
746
756
* - updates \ref db3 and \ref poolTotalFree.
747
757
* - Exit on out-of-memory
748
758
* \bug If the \p target block is full after the copy operation, it is not
0 commit comments