Use this view to show any memory leaks and errors in your program found by memory analysis tooling. The following are some
of the problems that can appear in the Memory Problems view:
- heap memory is corrupted
- an attempt to free a non-heap pointer
- writing to previously freed memory
- a memory leak of a specific size
The following example shows some typical memory problems that you might encounter using the Memory Problems view.
Note: If you want to capture the memory error data and review these results outside of the IDE, press
CTRL-A
to select all of the information contained within the table, and then press
Ctrl-C
to copy it as text to the clipboard.
For a description about the error message text, and for more information about the particular error, see Summary of error messages for Memory Analysis. For information about the general error categories, why the errors occur, and how to fix them, see Interpret errors during memory analysis .
To show the problems, click on session or session element (such as a thread, file, and so on) from the Session View (see Managing Memory Analysis sessions: The Session view), or activate the memory analysis editor (see Memory Analysis editor).
The Memory Problems view provides the following columns in the problems table (not all columns are present by default, you
can select columns using the view preferences):
Type |
Description |
Severity
|
LEAK or ERROR with corresponding icon. |
Description
|
An Error message. |
Pointer
|
A pointer is involved in the error or leak. |
Tid
|
The thread ID of the thread that was running in which and error was detected. |
Pid
|
The process ID. |
Binary
|
The binary for the top frame of a backtrace. |
Location
|
The source location (file:line) for the top frame of a backtrace.
|
Timestamp
|
The library timestamp (can be wrapped data). |
Event id
|
A unique event ID, ordered by error occurrence. |
Trap Function
|
A function that was checked when an error is detected. |
Alloc Kind (prev. Operation)
|
A type of heap allocation involved in an error. |
Count
|
When grouped, it represents a count of the grouped errors. |
State - "in use" - pointer is used, "freed"
|
The pointer is freed. |
The Memory Analysis view provides the following functionality and features:
- Double-click a particular problem in the list, and then the IDE highlights the corresponding source code line (if it exists).
- Click a particular problem in the list, the problem is selected, and the IDE updates problem backtrace in Memory Backtrace view.
- Click on a column header, and then the IDE sorts the data by the column value.
- Drag and drop columns by their header to rearrange the column order.
- Press Ctrl-C (or use your specific platform copy command). The IDE copies the text representation of the problem to the clipboard.
- Double-click the view header to maximize the view (or return to normal when currently maximized).
- Right-click in the table to open the context menu. For a list of context menu items, see below.
View action bar
- Remove Events - remove (by filtering) the current events from the view. Enabled when running.
- Dump Leaks - execute the dump leaks command (the application has to run the control thread). Enabled when running.
- Open Filter Dialog - open the Filter dialog (see description below).
- Prevent Auto-Refresh - don't perform a refresh automatically. Enabled when running.
- Refresh - force a refresh.
- View Menu - open the View menu (see description below).
- Minimize - minimize the view.
- Maximize - maximize the view (or return to normal size when currently maximized).
Memory Problems view context menu
-
Filter… - opens the traces filter.
-
Quick Filter
-
Up to Event - show all errors up to this current error (by time occurrence).
-
From Event - show only the errors from this current error (by time occurrence).
-
Same backtrace - show only errors with the same backtrace.
-
Show All - reset the filter.
-
Group By
-
None - no grouping is done.
-
Type - group by error type.
-
Backtrace - group errors with the same backtrace under a single group. For group entries, the non-aggregated column shows a value for
the first entry.
-
Thread - group by thread ID.
-
Severity - group by error severity.
-
Show Backtrace - activates the Memory Backtrace view and shows the current backtrace in the view.
-
Show Source - show the context menu and double-click, then go to the selected event source location.
-
Preferences… - open the view preferences dialog to set the column selection and order.