prg_mem_stats_print()
Abstract
Displays a table with memory usage statistics for objects in the system.
Syntax
prg_mem_stats_print (thresh, options)
| Argument | Type | Description |
|---|---|---|
thresh |
int |
Minimum size of memory block to consider for display. |
options |
int |
Flags that specify how statistics are to be displayed. PRGC_MEMSTATS_LONG and PRGC_MEMSTATS_SHORT, corresponding to the long and short formats used by the ODB “memstats“ command. |
Return Type
void
No return value.
Header
prg_mem_funcs.h
Example
/* Display memory usage statistics after an Ema model has been read, to */
/* determine memory-usage */
model_id = Ema_Model_Read (MOD_NETWORK, “atm_clsvr_net”);
/* print statistics */
prg_mem_stats_print (0, PRGC_MEMSTATS_LONG);
Details
This function can be used as a debugging or diagnostic tool to obtain information on memory usage of objects in the executable program. When called, it displays a table of memory types or categories and statistical information about memory usage for objects of each memory type. Statistical information for each memory category includes the size of each object in that memory category, the total number of such objects in use, and the amount of memory in kilobytes that all such objects in the system currently use.
The thresh argument specifies a threshold for objects of interest. If the total amount of memory (in kilobytes) used by an object type is less than the specified threshold, statistics for that object type are not displayed.
Note: Only total memory usage is reported if the “mem_optimize“ preference is set to FALSE.
Purpose
To display information about memory usage in the system for common objects.
Errors
- None
Reference
- None