Please enable JavaScript to view this site.

Memory Validator Help

 

Searching for object allocations in functions

 

Using the Find Function dialog below, you can search for allocations occurring in certain functions.

 

The functions can be the allocating function or anywhere in the allocation callstack

 

This feature is very similar in behaviour to finding objects.

 

 

The find function dialog

 

To show the Find Function dialog, choose the menu option below:

 

menu Query menu instructionStep choose Find Function... instructionStep displays the Find Function dialog

 

Or use the following icon on the Query Toolbar.

 

toolbar-find-function

 

 

 query-function

 

 

 

Search criteria

 

Enter a function name, and optionally any other search characteristics to find objects allocated in matching functions

 

Function instructionStep enter full or partial function name

 

Match case instructionStep tick to do a case-sensitive match

 

Complete function name instructionStep tick to only match the whole name

 

 note For C++ methods, complete names must be of the form classname::methodname.

 

Trace locations instructionStep matches only the function containing the allocation

 

Callstacks instructionStep matches any function in the allocation callstack

 

 

Allocation types

 

As well as allocations you can search for reallocation and/or deallocation events:

 

Allocated instructionStep search for allocations
 

Reallocated instructionStep search for reallocations
 

Deallocated instructionStep search for deallocation events
 

 

Finding results

 

Find instructionStep performs the search displaying results in the list
 

Results replace any previous search, unlike querying addresses or objects where the results are added to the list.

 

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

 

 


 

Examples of finding allocations in functions

 

Memory Validator has an example program you can use to safely explore features.

 

In the example program, the Allocation menu has an option Test Many Hooks at once.

 

After doing that, the example searches can be made below.

 

Searching only within matching functions

 

Searching for allocations only in functions that have ontest as part of their name finds these results in CTeststakView::OnTestManyHooks

 

query-function-example2

 

Searching anywhere in the callstack

 

Keeping the same function name but now searching in any part of the callstack additionally finds two more allocations in functions underneath CTeststakView::OnTestManyHooks

 

 

query-function-example1