RTI Connext C API Version 7.3.0
|
Monitor memory allocations done by the middleware on the native heap. More...
Data Structures | |
struct | NDDS_Utility_HeapMonitoringParams_t |
Input parameters for enabling heap monitoring. They will be used for configuring the format of the snapshot. More... | |
Macros | |
#define | NDDS_Utility_HeapMonitoringParams_INITIALIZER |
Static initializer for NDDS_Utility_HeapMonitoringParams_t. More... | |
Typedefs | |
typedef struct NDDS_Utility_HeapMonitoringParams_t | NDDS_Utility_HeapMonitoringParams_t |
Input parameters for enabling heap monitoring. They will be used for configuring the format of the snapshot. More... | |
Enumerations | |
enum | NDDS_Utility_HeapMonitoringSnapshotOutputFormat { NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_OUTPUT_FORMAT_STANDARD , NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_OUTPUT_FORMAT_COMPRESSED } |
Specify the format of the output of the snapshot. RTI Connext. More... | |
enum | NDDS_Utility_HeapMonitoringSnapshotContentFormat { NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_BIT_TOPIC , NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_BIT_FUNCTION , NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_BIT_ACTIVITY , NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_DEFAULT , NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_MINIMAL } |
Bitmap used to decide which information of the snapshot will be displayed. More... | |
Functions | |
DDS_Boolean | NDDS_Utility_enable_heap_monitoring (void) |
Starts monitoring the heap memory used by RTI Connext. More... | |
DDS_Boolean | NDDS_Utility_enable_heap_monitoring_w_params (const NDDS_Utility_HeapMonitoringParams_t *params) |
Starts monitoring the heap memory used by RTI Connext. More... | |
void | NDDS_Utility_disable_heap_monitoring (void) |
Stops monitoring the heap memory used by RTI Connext. More... | |
DDS_Boolean | NDDS_Utility_pause_heap_monitoring (void) |
Pauses heap monitoring. More... | |
DDS_Boolean | NDDS_Utility_resume_heap_monitoring (void) |
Resumes heap monitoring. More... | |
DDS_Boolean | NDDS_Utility_take_heap_snapshot (const char *filename, DDS_Boolean print_details) |
Saves the current heap memory usage in a file. More... | |
Monitor memory allocations done by the middleware on the native heap.
RTI Connext allows you to monitor the memory allocations done by the middleware on the native heap. This feature can be used to analyze and debug unexpected memory growth.
After NDDS_Utility_enable_heap_monitoring is called, you may invoke NDDS_Utility_take_heap_snapshot to save the current heap memory usage to a file. By comparing two snapshots, you can tell if new memory has been allocated and, in many cases, where.
#define NDDS_Utility_HeapMonitoringParams_INITIALIZER |
Static initializer for NDDS_Utility_HeapMonitoringParams_t.
Use this initializer to ensure that new objects do not have uninitialized contents.
Input parameters for enabling heap monitoring. They will be used for configuring the format of the snapshot.
Specify the format of the output of the snapshot. RTI Connext.
Bitmap used to decide which information of the snapshot will be displayed.
Enumerator | |
---|---|
NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_BIT_TOPIC | Add the topic to the snapshot of heap monitoring. |
NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_BIT_FUNCTION | Add the function name to the snapshot of heap monitoring. |
NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_BIT_ACTIVITY | Add the activity context to the snapshot of heap monitoring. The user can select the information that will be part of the activity context by using the API NDDS_Config_ActivityContext_set_attribute_mask. |
NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_DEFAULT | Add all the optional attributes to the snapshot of heap monitoring. |
NDDS_UTILITY_HEAP_MONITORING_SNAPSHOT_CONTENT_MINIMAL | Not add any optional attribute to the snapshot of heap monitoring. |
DDS_Boolean NDDS_Utility_enable_heap_monitoring | ( | void | ) |
Starts monitoring the heap memory used by RTI Connext.
This function must be called before any other function in the RTI Connext library is called.
Once heap monitoring is enabled, you can take heap snapshots by using NDDS_Utility_take_heap_snapshot.
Use this function only for debugging purposes, since it may introduce a significant performance impact.
DDS_Boolean NDDS_Utility_enable_heap_monitoring_w_params | ( | const NDDS_Utility_HeapMonitoringParams_t * | params | ) |
Starts monitoring the heap memory used by RTI Connext.
Perfoms the same function as NDDS_Utility_enable_heap_monitoring except that it also provides the values in params. Those values will set the format used in the snapshot NDDS_Utility_take_heap_snapshot.
void NDDS_Utility_disable_heap_monitoring | ( | void | ) |
Stops monitoring the heap memory used by RTI Connext.
This function must be the last function called from RTI Connext.
DDS_Boolean NDDS_Utility_pause_heap_monitoring | ( | void | ) |
Pauses heap monitoring.
New memory allocations will not be monitored and they will not appear in the snapshot generated by NDDS_Utility_take_heap_snapshot.
DDS_Boolean NDDS_Utility_resume_heap_monitoring | ( | void | ) |
Resumes heap monitoring.
DDS_Boolean NDDS_Utility_take_heap_snapshot | ( | const char * | filename, |
DDS_Boolean | print_details | ||
) |
Saves the current heap memory usage in a file.
After NDDS_Utility_enable_heap_monitoring is called, you may invoke this function periodically to save the current heap memory usage to a file.
By comparing two snapshots, you can tell if new memory has been allocated and in many cases where. This is why this operation can be used to debug unexpected memory growth.
The format of a snapshot is as follows:
First, there is a memory usage summary like this:
After the previous summary, and only if you set the parameter print_details to DDS_BOOLEAN_TRUE, the function will print the details of every single outstanding heap allocation done by RTI Connext. For example:
filename | <<in>>. Name of file in which to store the snapshot. |
print_details | <<in>>. Indicates if the snapshot will contain only the memory usage summary or the details of the individual allocations. |