Please enable JavaScript to view this site.

Memory Validator Help

The Callstack Trim tab allows you to specify symbols that should not appear in callstacks collected by Memory Validator.

 

The default options are shown below:

 

callstack-filters-settings

 

 

Callstack trim filters

 

Callstack trim filters can help simplify the display of callstacks, making it easier to see effective rather than actual allocation locations.

 

There are two principal use case for this feature:

 

1.when an inline function definition allocates memory which is then used by your application.

 

2.when some functions wrap a function that is allocating memory but you don't want the wrapper functions appearing in your callstack. An example of this might be an in-house memory allocator that wraps the malloc/realloc/free functions.

 

By removing the symbol from the callstack, the memory appears to be allocated at the point of calling the inlined function, not inside it.

 

By way of example, the two images below show  a callstack for allocating a BSTR using an inline function A2BSTR which calls another inlined function A2WBSTR, defined in the ATL header file atlconv.h.

 

The second version has had the inline functions (A2BSTR and A2WBSTR) filtered out so as not to appear in the callstack.

 

 csFilterDialog1         csFilterDialog2

 

 

Using callstack trim filters

 

Add a symbol to the list of symbols to be filtered out of the beginning of callstacks:

 

Add instructionStep An entry is added to the list instructionStep enter the name of the symbol instructionStep press return or click anywhere outside of the field to confirm (or press escape to cancel)
 

Remove instructionStep removes any select entries in the list
 

Remove All instructionStep removes all symbol names, clearing the list

 

To edit an existing symbol, double click the list entry.

 

 

Batch adding of callstack trim filters

 

For a couple of specific cases, you can add multiple callstack filters at once, although note that these are already in the list by default.

 

ATLconv instructionStep add the default inline symbols used in the atlconv.h header file (T2BSTR, A2BSTR etc)
 

MinGW instructionStep add the default memory allocation and deallocation symbols used in the MinGW compiler (__Znwj, __Znaj, and __ZdlPv)

 

C++ Builder instructionStep add the symbols used in the C++ Builder compiler (_ClassCreate, and @ClassCreate$)
 

 

When will the callstack trim filters take effect?

 

The callstack trim filters will be used the next time you monitor an application using Memory Validator.

 

 

Trim existing callstacks

 

If you need to trim the callstacks in the current session you can do that using the Apply Trim option.

 

Apply Trim instructionStep apply the callstack trim filters to callstacks that have already been collected. This will cause any displays with callstacks to refresh.
 

 

Reset All - Resets all global settings, not just those on the current page.

 

 

Reset - Resets the settings on the current page.