Skip to content

Commit c58210d

Browse files
committed
do the best to ref to bug()
1 parent ff8f9d1 commit c58210d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/mmdata.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ void *poolFixedMalloc(long size /* bytes */);
327327
* \param[in] size (in bytes) of the block, not including the block header.
328328
* \return a \ref block with enough capacity for \p size bytes of data. The
329329
* data space is filled with random contents, but in the block header its
330-
* \p size is noted. Exit on out-of-memory
330+
* \p size is noted.´ Exit on out-of-memory
331331
*/
332332
void *poolMalloc(long size /* bytes */);
333333
/*!
@@ -364,13 +364,13 @@ void poolFree(void *ptr);
364364
* \n
365365
* Before \p ptr is added to \ref memUsedPool, the pool size is checked and
366366
* increased by \ref MEM_POOL_GROW if full. This may lead to out-of-memory
367-
* \ref bug "bugs". But if \p prt is added to the end of the \ref memUsedPool,
367+
* \ref outOfMemory "exit". But if \p ptr is added to the end of the \ref memUsedPool,
368368
* \ref poolTotalFree is updated.
369369
* \param[in] ptr pointer to a \ref block.
370370
* \pre
371371
* the block is \ref fragmentation "fragmented" (contains unused memory)
372-
* If it is full \ref bug is called and the function returns without further
373-
* action.
372+
* If it is full, \ref bugfn "bug" is called and the function returns without
373+
* further action.
374374
* \post
375375
* - \ref poolTotalFree is the current free space in bytes in both pools.
376376
* - A full \ref block is not added to \ref memUsedPool by this function.
@@ -401,7 +401,7 @@ void memFreePoolPurge(flag untilOK);
401401
* \param[out] usedActual (not-null) address of a long variable receiving the
402402
* accumulated bytes consumed by usage so far. This value includes the hidden
403403
* header of the block.
404-
* \pre Do not call within bug().\n
404+
* \pre Do not call within \ref bugfn "bug".\n
405405
* Submit only non-null pointers, even if not all information is requested.\n
406406
* Pointers to irrelevant information may be the same.
407407
* \post Statistic data is copied to the locations the parameters point to.
@@ -434,7 +434,9 @@ void outOfMemory(const char *msg);
434434

435435
/* Bug check error */
436436
/*!
437+
* \anchor bugfn
437438
* \fn void bug(int bugNum)
439+
* \param[in] bugNum
438440
*/
439441
void bug(int bugNum);
440442

src/mmvstr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void freeTempAlloc(void) {
9595
* \fn pushTempAlloc(void *mem)
9696
* \brief pushes a pointer onto the \ref tempAllocStack.
9797
*
98-
* In case of a stack overflow \ref bug is called. This function is low level
98+
* In case of a stack overflow \ref bugfn "bug" is called. This function is low level
9999
* that does not ensure that invariants of \ref tempAllocStack are kept.
100100
*
101101
* \param mem (not null) points to either a non-mutable empty string, or
@@ -131,8 +131,8 @@ static void pushTempAlloc(void *mem)
131131
* \ref tempAllocStack
132132
*
133133
* This low level function does NOT initialize the allocated memory. If the
134-
* allocation on the heap fails, \ref bug is called. The statistic value
135-
* \ref db1 is updated.
134+
* allocation on the heap fails, \ref bugfn "bug" is called. The statistic
135+
* value \ref db1 is updated.
136136
*
137137
* \param size (> 0) number of bytes to allocate on the heap. If the memory is
138138
* intended to hold NUL terminated text, then size must account for the final

0 commit comments

Comments
 (0)