CVIDynamicMemoryInfo

int CVIDynamicMemoryInfo (const charMessage[], unsigned int *allocatedBlocks, unsigned int *allocatedBytes, unsigned int options);

Purpose

Returns information about dynamic memory in a program.

CVIDynamicMemoryInfo determines the total number of memory blocks allocated and the total number of bytes allocated.

In addition, the function can display this information and additional information for each individual memory block in the debug output window.

Parameters

Input
Name Type Description
charMessage const char [] A custom message that appears alongside the memory information in the debug output window. This message helps associate a memory dump with the corresponding location in the source code.
options unsigned int Options to customize the behavior of CVIDynamicMemoryInfo.

Currently, the following options are supported:

DYNAMIC_MEMORY_SHOW_ALLOCATED_MEMORY—Displays size and content (the first few bytes) of individual memory blocks in the debug output window.
DYNAMIC_MEMORY_SHOW_ALLOCATED_MEMORY_SUMMARY—Lists total number and size of all allocated memory blocks in the debug output window.
Output
Name Type Description
allocatedBlocks unsigned int (passed by reference) Contains the total number of allocated memory blocks when the function returns.

allocatedBlocks can be NULL.
allocatedBytes unsigned int (passed by reference) Contains the total number of bytes allocated in all memory blocks.

allocatedBytess can be NULL.

Return Value

Name Type Description
result int The return value of this function. CVIDynamicMemoryInfo returns 0 if it completed successfully.