The Query<\/span> tab shows groups of search results and allows you to find many types of related data for different memory allocations.<\/p>\n\r <\/p>\n\r Click a part of the image below to jump straight to the help for that area.<\/p>\n\r <\/p>\n\r <\/p>\n\r If you\'ve read the previous sections then you\'ll probably have seen menu options referring to showing results here on the analysis tab.<\/p>\n\r <\/p>\n\r Think of the analysis tab as a basket where you can send groups of data to inspect at your leisure.<\/p>\n\r <\/p>\n\r That data will appear in the upper of the two resizable windows and becomes your working data<\/span> from which you can also find related allocations to display in the lower window.<\/p>\n\r <\/p>\n\r <\/p>\n\r Both the upper and lower views show data in the same format as that found in the Memory tab\'s collected data<\/a>.<\/p>\n\r <\/p>\n\r Each line has an icon<\/a> at the left, indicating its type, and has an explanatory tooltip:<\/p>\n\r <\/p>\n\r <\/p>\n\r The text on each line is the same and indicates:<\/p>\n\r <\/p>\n\r •<\/span>datatype (if known) <\/span><\/p> •<\/span>size<\/p> •<\/span>allocation address\/handle value <\/p> •<\/span>source file and line number (if available) where the allocation occurred<\/p> •<\/span>an optional event sequence id<\/a> at the beginning of the line<\/p> <\/p>\n\r The background colour<\/a> for each line indicates the status of the data - eg, leaked, damaged, or uninitialized. <\/p>\n\r <\/p>\n\r To edit the source code<\/a>, double click on any part of the lines of source code displayed or use Edit Source Code...<\/span> <\/p>\n\r <\/p>\n\r <\/p>\n\r The upper window will contain any data sent from other tabs or results of queries made via the buttons at the left.<\/p>\n\r <\/p>\n\r This becomes your working data, and will grow (with a header line between each group) as each set of results is added.<\/p>\n\r <\/p>\n\r Using the relations option on the popup menu, you can then find related allocations or objects which are displayed as separate results in the lower window.<\/p>\n\r <\/p>\n\r <\/p>\n\r <\/p>\n\r Having obtained related data in the lower window you can inspect it in the same way, filter it and promote it back up to the top window.<\/p>\n\r <\/p>\n\r <\/p>\n\r <\/a>Analysis tab options - upper window<\/span><\/p>\n\r At the far left of the window are the now familiar options for filtering data using the the Watermark<\/a> and Tracker<\/a> methods outlined for the Memory tab.<\/p>\n\r <\/p>\n\r <\/p>\n\r <\/p>\n\r Also familiar, are the filter and display settings:<\/p>\n\r <\/p>\n\r •<\/span>Filter... <\/span> shows the local filters<\/a> dialog for the memory tab <\/span><\/p> <\/p>\n\r <\/span>The filter button also indicates the number<\/span> of local filters, although not all of these may be enabled <\/p>\n\r <\/p>\n\r •<\/span>Display... <\/span> shows the Analysis Display Settings<\/a> dialog <\/p> <\/p>\n\r Unlike other tabs, there are no options to update the display here, since the data is always static.<\/p>\n\r <\/p>\n\r Instead, there are options to change the type of memory allocation you are interested in, and these will only take effect on any new queries added to the display.<\/p>\n\r <\/p>\n\r <\/p>\n\r <\/p>\n\r <\/p>\n\r •<\/span>Behaviour <\/span> choose to show memory that has reached one or all of the allocation, reallocation and deallocation stages <\/span><\/p> <\/p>\n\r •<\/span>Type <\/span> choose to show query results for handles, or memory as per the above behaviour, or both<\/p> <\/p>\n\r <\/span><\/p>\n\r •<\/span>Clear Results <\/span> removes all working data from the upper window only as the lower window has its own clear button <\/span><\/p> <\/p>\n\r <\/p>\n\r The data in the analysis tab is not limited to that sent from other tabs. <\/p>\n\r <\/p>\n\r From the buttons at the left you can run some common or very targeted queries to search for allocations, reallocations, and deallocations of memory and resource handles.<\/p>\n\r <\/p>\n\r <\/p>\n\r Several of the main tabs have some comprehensive methods of querying<\/a> memory or functions, and which are accessible from the main query menu<\/a> and query toolbar<\/a>.<\/p>\n\r <\/p>\n\r The Analysis tab has dedicated buttons for two of these queries:<\/p>\n\r <\/p>\n\r •<\/span>Memory...<\/span> Shows the Find Memory<\/a> dialog to use a wide range of search criteria to find memory <\/span> •<\/span>Functions...<\/span> Shows the Find Functions<\/a> dialog but displays the results here in the analysis tab <\/p>\n\r There are a selection of common predefined queries available at a single click:<\/p>\n\r <\/p>\n\r <\/p>\n\r <\/p>\n\r •<\/span>Damaged<\/span> finds all damaged memory allocations, such as overwrite, underwrite, double delete, etc <\/span> •<\/span>Uninitialised<\/span> shows any detected uninitialised memory if you\'ve switched these hooks<\/a> and settings<\/a> on <\/span><\/p> <\/p>\n\r •<\/span>Leaked<\/span> finds all leaked locations, memory and handles still in use after the application has exited <\/span><\/p> <\/p>\n\r •<\/span>Invalid Handles<\/span> finds all invalid or NULL handles <\/span><\/p> <\/p>\n\r •<\/span>Trace Messages<\/span> shows any trace messages if you\'ve switched the trace hook setting<\/a> on <\/span><\/p> <\/p>\n\r Memory re-use is not necessarily an error, in fact it almost certainly isn\'t, as the allocator will provide previously freed memory addresses as memory allocation addresses.<\/p>\n\r <\/p>\n\r For certain bugs, memory corruption being an example, you may be interested in knowing which locations allocated memory allocations at a particular address,<\/p>\n\r and if that address has been re-used. These are targets for further investigation.<\/p>\n\r <\/p>\n\r •<\/span>Memory Reuse<\/span> searches for reused memory in the application <\/span><\/p> <\/span><\/p>\n\r <\/p>\n\r <\/span><\/p>\n\r Because search through all memory may take a long time in a large and active application, you can instead opt to search within a range of memory: <\/p>\n\r <\/p>\n\r The start and end addresses for the memory range can be entered in decimal or hexadecimal format with the leading 0x<\/span><\/p>\n\r <\/p>\n\r Note that some libraries outside your control may reuse memory, so be aware that not all results found are necessarily errors in your application.<\/p>\n\r <\/p>\n\r <\/p>\n\r <\/a>Analysis tab options - lower window<\/span><\/p>\n\r The lower window has it\'s own comparatively simple set of options:<\/p>\n\r •<\/span>Auto Clear<\/span> clears the lower window before adding a new relations search from the upper window <\/span><\/p> <\/span><\/p>\n\r •<\/span>Clear when Promote<\/span> clears the lower window when promoting these results to the upper window <\/span><\/p> <\/span><\/p>\n\r •<\/span>Clear Results<\/span> simply empties the lower window <\/span> <\/p>\n\r •<\/span>Filter Results<\/span> optionally filters the lower window data using the same filters as the upper window <\/span><\/p> <\/span><\/p>\n\r •<\/span>Use Watermarks on Results<\/span> applies the upper window\'s watermark settings to the lower window <\/span><\/p> <\/span><\/p>\n\r •<\/span>Include search in results<\/span> brings the upper window item that initiated the relations search along with the results <\/span> •<\/span>Promote Results<\/span> pushes all or selected lower window results into the upper window, optionally adding to or replacing<\/a> what\'s there already <\/span> <\/p>\n\r <\/p>\n\r The following popup menu is available over the upper window.<\/p>\n\r <\/p>\n\r <\/span><\/h1>\n\r
<\/span><\/h1>\n\r
<\/a>The Analysis Data<\/span><\/h1>\n\r
<\/h1>\n\r
<\/a>The upper window - working data<\/span><\/h1>\n\r
<\/span><\/h1>\n\r
<\/a>The lower window - results within results<\/span><\/h1>\n\r
<\/span><\/h1>\n\r
\n\r <\/p>\n\r<\/a>Running data queries<\/span><\/h1>\n\r
<\/span><\/h1>\n\r
<\/a>Custom queries<\/span><\/h1>\n\r
<\/span><\/h1>\n\r
\n\r <\/span><\/p>
\n\r <\/p><\/a>Predefined queries<\/span><\/h1>\n\r
<\/span><\/h1>\n\r
\n\r <\/span><\/p> <\/span><\/h1>\n\r
<\/a>Memory reuse<\/span><\/h1>\n\r
<\/span><\/h1>\n\r
<\/span><\/h1>\n\r
<\/span><\/h1>\n\r
<\/h1>\n\r
<\/span><\/h1>\n\r
\n\r <\/span><\/p>
\n\r <\/span>
\n\r <\/span><\/p>
\n\r <\/span>
\n\r <\/span><\/p><\/a>Analysis view popup menu<\/span><\/h1>\n\r