Cleanup: move doc-strings to declarations
Move into headers or to the top of the function body for internal implementation details, in some cases remove duplicate doc-strings.
This commit is contained in:
@@ -93,6 +93,15 @@ void memory_usage_block_alloc(size_t size);
|
||||
void memory_usage_block_free(size_t size);
|
||||
size_t memory_usage_block_num(void);
|
||||
size_t memory_usage_current(void);
|
||||
/**
|
||||
* Get the approximate peak memory usage since the last call to #memory_usage_peak_reset.
|
||||
* This is approximate, because the peak usage is not updated after every allocation (see
|
||||
* #peak_update_threshold).
|
||||
*
|
||||
* In the worst case, the peak memory usage is underestimated by
|
||||
* `peak_update_threshold * #threads`. After large allocations (larger than the threshold), the
|
||||
* peak usage is always updated so those allocations will always be taken into account.
|
||||
*/
|
||||
size_t memory_usage_peak(void);
|
||||
void memory_usage_peak_reset(void);
|
||||
|
||||
|
||||
@@ -515,7 +515,8 @@ void MEM_lockfree_printmemlist() {}
|
||||
|
||||
void mem_lockfree_clearmemlist() {}
|
||||
|
||||
/* unused */
|
||||
/* Unused. */
|
||||
|
||||
void MEM_lockfree_callbackmemlist(void (*func)(void *))
|
||||
{
|
||||
(void)func; /* Ignored. */
|
||||
@@ -560,7 +561,8 @@ uint MEM_lockfree_get_memory_blocks_in_use()
|
||||
return uint(memory_usage_block_num());
|
||||
}
|
||||
|
||||
/* dummy */
|
||||
/* Dummy. */
|
||||
|
||||
void MEM_lockfree_reset_peak_memory()
|
||||
{
|
||||
memory_usage_peak_reset();
|
||||
|
||||
@@ -252,15 +252,6 @@ size_t memory_usage_current()
|
||||
return size_t(mem_in_use);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the approximate peak memory usage since the last call to #memory_usage_peak_reset.
|
||||
* This is approximate, because the peak usage is not updated after every allocation (see
|
||||
* #peak_update_threshold).
|
||||
*
|
||||
* In the worst case, the peak memory usage is underestimated by
|
||||
* `peak_update_threshold * #threads`. After large allocations (larger than the threshold), the
|
||||
* peak usage is always updated so those allocations will always be taken into account.
|
||||
*/
|
||||
size_t memory_usage_peak()
|
||||
{
|
||||
update_global_peak();
|
||||
|
||||
Reference in New Issue
Block a user