@@ -180,19 +180,17 @@ vstring g_qsortKey; /* Used by qsortStringCmp; pointer only, do not deallocate *
180
180
* similar, all pushed onto this stack. When the final operation is executed,
181
181
* and its result is persisted in some variable, the dependency on its
182
182
* temporary operands ceases. Consequently, they should be freed again. To
183
- * automate this operation, such a stack maintains a __start__ index. A
184
- * client saves this value and sets it to the current stack top, then starts
185
- * pushing dynamically allocated operands on the stack. After the result is
186
- * persisted, all entries beginning with the element at index __start__ are
187
- * deallocated again, and the stack top is reset to the __start__ value, while
188
- * the __start__ value is reset to the saved value, to accomodate nesting of
189
- * this procedure.
183
+ * automate this operation, such a stack maintains a `start` index. A client
184
+ * saves this value and sets it to the current stack top, then starts pushing
185
+ * dynamically allocated operands on the stack. After the result is persisted,
186
+ * all entries beginning with the element at index `start` are deallocated
187
+ * again, and the stack top is reset to the `start` value, while the `start`
188
+ * value is reset to the saved value, to accommodate nesting of this procedure.
190
189
*
191
190
* This scheme needs a few conditions to be met:
192
191
* - No operand is used in more than one evaluation context;
193
192
* - Operations are executed strictly sequential, or in a nested manner. No two
194
193
* operations interleave pushing operands.
195
- * push operands interleaved
196
194
*/
197
195
198
196
/* Memory pools are used to reduce the number of malloc and alloc calls that
@@ -213,16 +211,27 @@ vstring g_qsortKey; /* Used by qsortStringCmp; pointer only, do not deallocate *
213
211
The pointer to an array always points to element 0 (recast to right size).
214
212
*/
215
213
214
+ /*!
215
+ * \page doc-todo Improvements in documentation
216
+ *
217
+ * - Revisit the \ref block "block", \ref stack "stack" references to check the
218
+ * inserted wording.
219
+ * - Check what the advantages of __p__ tag are and whether the are better
220
+ * replaced with backtick pairs. (\p aParam vs `aParam`)
221
+ * - Regularly check the warning in \ref pntrString to see whether it still
222
+ * holds, or can be made more precise.
223
+ */
224
+
216
225
/*!
217
226
* \def MEM_POOL_GROW
218
227
* Amount that \ref memUsedPool and \ref memFreePool grows when it overflows.
219
228
*/
220
- #define MEM_POOL_GROW 1000 /* Amount that a pool grows when it overflows. */
229
+ #define MEM_POOL_GROW 1000
221
230
/*??? Let user set this from menu. */
222
231
/*!
223
232
* \var long poolAbsoluteMax
224
233
* The value is a memory amount in bytes.
225
- * \n
234
+ *
226
235
* The \ref suballocator scheme must not hold more memory than is short term
227
236
* useful. To the operating system all memory in \ref memFreePool appears as
228
237
* allocated, although it is not really in use. To prevent the system from
@@ -590,14 +599,13 @@ void addToUsedPool(void *ptr)
590
599
* Starting with the last entry in \ref memFreePool, memory held in that pool
591
600
* is returned to the system until all, or at least a sufficient amount is
592
601
* freed again (see \p untilOK).
593
- * \param[in] untilOK if 1 freeing \ref block "blocks" stops the moment
594
- * \ref poolTotalFree gets within the range of \ref poolAbsoluteMax again.
595
- * Note that it is not guaranteed that the limit \ref poolAbsoluteMax is
596
- * undercut because still too much free memory might be held in the
597
- * \ref memUsedPool.
598
- * \n
599
- * If 0, all \ref memFreePool entries are freed, and the pool itself is
600
- * shrunk back to \ref MEM_POOL_GROW size.
602
+ * \param[in] untilOK
603
+ * - if 1 freeing \ref block "blocks" stops the moment \ref poolTotalFree
604
+ * gets within the range of \ref poolAbsoluteMax again. Note that it is
605
+ * not guaranteed that the limit \ref poolAbsoluteMax is undercut because
606
+ * still too much free memory might be held in the \ref memUsedPool.
607
+ * - If 0, all \ref memFreePool entries are freed, and the pool itself is
608
+ * shrunk back to \ref MEM_POOL_GROW size.
601
609
*/
602
610
void memFreePoolPurge (flag untilOK )
603
611
{
0 commit comments