lash_get_max_mem_usage, lash_get_mem_usage, lash_reset_max_mem_usage


[ Synopsis | Description | Return values | Diagnostics | Back to core package documentation ]

Synopsis

#include "lash-diag.h"

uint8 lash_get_max_mem_usage(void);
uint8 lash_get_mem_usage(void);
void lash_reset_max_mem_usage(void);

Description

These functions report the amount of memory dynamically allocated by the package. The current amount is returned by lash_get_mem_usage, and the maximum amount since initialization or last reset is returned by lash_get_max_mem_usage. The reported maximum amount of memory can be reset by calling lash_reset_max_mem_usage.

Return values

The functions lash_get_mem_usage and lash_get_max_mem_usage return an amount of memory expressed in bytes.

It should be noted that the reported amounts correspond to the quantity of memory requested by the package to the C library's malloc allocation function. Depending on the implementation of this function, the reported amount can be significantly less than the actual quantity of memory allocated to the user process.

Diagnostics

These functions do not report errors.

[ Synopsis | Description | Return values | Diagnostics | Back to core package documentation ]