Please enable JavaScript to view this site.

Memory Validator Help

 

Searching for allocation addresses

 

Using the Address Query dialog below, you can search the data for allocation events at or near an address.

 

Searches can include:

 

allocations in a memory block of a certain size, starting at an address of your choice
 

allocations within a specified range of a chosen address (+/-)

 

 

The address query dialog

 

To show the Address Query dialog, choose the menu option below:

 

menu Query menu instructionStep choose Query Address... instructionStep displays the Address Query dialog

 

Or use the following icon on the Query Toolbar.

 

toolbar-search-address

 

 

 query-address-dialog

 

 

Search criteria

 

The search address is essential, but size and range are optional for adding some tolerance.

 

The format of these values can be decimal or prefixed with 0x for a hexadecimal address.

 

Address to search for instructionStep enter the memory address of interest

 

Size instructionStep choose a size of memory block within which to search for allocations

 

Address within range instructionStep enter a tolerance range for finding allocations near to the address

 

The range can help find potential candidates for memory overrun, underrun and corruption problems.

 

 

Allocation types

 

As well as allocations you can search for reallocations and/or free events:

 

Allocated instructionStep search for allocations
 

Reallocated instructionStep search for reallocations
 

Deleted instructionStep search for free events
 

 

Query results

 

Query instructionStep performs the search
 

The search results are added to the list in the dialog.

 

Clear instructionStep clears all the results from the list
 

The list is not automatically cleared with each search, so you can compare results of different searches

 

The search results may be shown in the following sections if you entered any of the optional criteria:

 

results including the address

results within the size, if specified

results within range, if specified

 

You can specify decimal values and hexadecimal values for your search query.

 

For example, when searching for address 0x037e6120 with a size of 30 and a range of 0x1000:

 

query-address-dialog-results1

 

Results appear in the earliest of the above sections. They are not repeated in the case where the size and the range might capture overlapping results.

 

You can expand the search results, and double click the data items to edit source code in your preferred editor.

 

 

Finding referenced objects

 

As well as finding an object at an address, you can find which objects it may reference and which objects may reference it:

 

Addr Ref'd... instructionStep find other objects which are referenced by the object at the search address

 

Addr Ref'ing... instructionStep find other objects that reference the object at the search address

 

 

Similarly, within the main search results, you can select an item and find potentially referenced and referencing objects:

 

Referenced... instructionStep find other objects which are referenced by the selected object

 

Referencing... instructionStep find other objects that reference the selected object

 

note The target program must still be executing for references to be found. You wouldn't be able to find references in a session that has been loaded from a file.

 

 

The references dialog

 

Referenced and referencing pointers are listed in a new dialog.

 

query-address-dialog-example4

 

 

Update instructionStep refresh the results

 

You can keep several of these dialogs open if you want to compare results.

 

You can double click a row in the Referencing Pointers dialog to edit source code if its available.

 

note It's normal for there to sometimes be a pause before referenced objects are displayed. This is while the data is being found.

 

 

References dialog popup menuright_mouse_button

 

The following popup menu is available over the data area

 

Interactive clickable imageClick on any part of the menu to jump straight to the topic below:

 

  references-dialog-menu

 

 

Edit Source Code... instructionStep view the source code in the source code editor

 

Referencing Pointers... instructionStep view pointers referencing the selected address

 

Referenced Pointers... instructionStep view pointers referenced by the selected address

 

Show Data at (bytes)... instructionStep view the contents of memory at the selected address

 

Relations instructionStep a submenu of additional queries related to the current allocation

 

 

right_mouse_buttonMenu option: relations

 

The relations menu has a large sub-menu with many different options for choosing a set of related data to display in the upper analysis window.

 

Think of this as a sub-query on the working data - like searching for friends of friends on a social network!

 

Available relations are as follows, with allocations generally meaning any allocation, reallocation or deallocation

 

Same address

Same size

Smaller

Larger

Finds any other allocations on the same memory address (allocations, reallocs, or frees)

Allocations on any memory objects of identical size

  or on smaller

  or larger objects

Same object type

Finds any other allocations of the same type

Same source file

Same DLL

All allocations from the same file...

  or the same DLL  

Allocations within

For memory allocations, finds all other allocations within a range of 32 bytes up to 4Kb of this one

 

 

seeAlso Also see the examples below.

 


 

Examples of searches and finding referenced objects

 

Getting an address to search for

 

Memory Validator has an example program with which to safely explore all the features available.

 

While the example program is running, refreshing the Memory Tab view should show an allocated object of type CSingleDocTemplate:

 

query-address-dialog-example1

 

Address to search for

 

Using the Query Address dialog to search for that object's address and size (address 0x0060A10, size 140 in this case) should show the expected result:

 

query-address-dialog-example2

 

Size

 

Expanding the size to 0x100 may find more objects. For example:

 

query-address-dialog-example3

 

Address within range

 

Additionally, setting the range to 0x1000 might give the result:

 

query-address-dialog-results1

 

Addr Ref'd

 

Clicking Addr Ref'd to find referenced objects should include CTeststakDoc being referenced by the CSingleDocTemplate :

 

query-address-dialog-addrReferenced

 

Addr Ref'ing

 

Clicking Addr Ref'ing to find objects referencing the object at the address 0x0231BD50 might show something like:

 

query-address-dialog-addrReferencing