prg_mem_stats_total_usage_get()

Abstract

Gets the total memory usage for general, pooled, categorized, or all memory, or a specified sub-category thereof.

Syntax

prg_mem_stats_total_usage_get (threshold, mem_cat, sub_cat_name)
Argument Type Description
threshold int Minimum size of memory block to consider when calculating total usage (blocks smaller than threshold are ignored).
mem_cat PrgT_Memstats_Usage_Category Memory category for which to report usage; one of the values in Table 5 Memory and Pooled Memory Package Symbolic Constants.
sub_cat_name const char * Optional sub-category name for which to report usage (see Details).

Return Type

int

The requested memory usage, in kilobytes.

prg_mem_funcs.h

Example

/* get the total memory usage after the first time */
if (index == 1)
	usage_first = prg_mem_stats_total_usage_get (0,
		PrgC_Memstats_Usage_Category_All, NULL);
else if (index == total / 2)
	usage_mid = prg_mem_stats_total_usage_get (0,
		PrgC_Memstats_Usage_Category_All, NULL);

Details

If sub_cat_name is NULL, the total memory usage for the specified category will be returned; otherwise, usage for that sub-category will be returned. Usage is 0 if the sub-category does not exist.

Note: Only total memory usage is reported if the “mem_optimize“ preference is set to FALSE.

Purpose

Provides a way to get total memory usage for general, pooled, categorized, or all memory, or a specified sub-category thereof.

Errors

  • None

Reference

  • None

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com