Please enable JavaScript to view this site.

Memory Validator Help

The Allocation Range tab allows you to restrict Memory Validator to only tracking allocations in a specified size range.

 

This can be very useful for identifying specific leaks in an application that otherwise makes a large number of allocations.

 

allocation-range-settings

 

 

 

Allocation size range

 

The default option is Track all memory allocations, regardless of size.

 

Alternatively you can restrict collection according to the size of the allocation:

 

Choose Track only memory allocations inside the range specified instructionStep Enter Minimum and Maximum sizes instructionStep enables the collection of memory allocation data based on allocation size

 

 

Caveats of restricting collection of data by size range

 

If you enable collection of data for a range of data sizes, it is possible for memory allocations that are reallocated, that the allocation, reallocation or deallocation of that memory size may not be recorded by Memory Validator. This is because the size of the allocation may be too small, even though a previous or subsequent allocation/reallocation is in range.

 

This can cause incorrect memory leak reports, please bear this in mind if you choose to use this option.

 

If your program never using realloc(), _expand(), HeapReAlloc() and so forth, this should not be an issue.

 

 

Allocations of unknown size

 

Whether you are collecting all allocations, or only allocations in a specific size range you need to decide how to handle allocations that have an unknown size.
 
Some allocations have an unknown size because they are returned from allocators where the size of the object is not disclosed (it's not an input parameter to the function), or where the function hook is unable to acquire the size data. The are not many functions that fall into this category, but it is important to mention them as ignoring such allocations may result in allocation data not being recorded.
 

Don't Track allocations of unknown size instructionStep memory allocation data will not be collected when the allocation size is not known  
 

Track allocations of unknown size instructionStep memory allocation data will be collected when the allocation size is not known
 

Convert allocations of unknown size to a known size instructionStep memory allocations that have an unknown size will have a synthetic size calculated for them
 

This option is provided so that unknown size allocations can be visualized in the memory timeline, even if the visualization isn't correct in the sense that the sizes are unknown. Without a valid size these allocation won't show in the summary status or the allocation timeline. The synthetic size is calculated from the length of the filename of the allocation location. For example, if allocated in file e:\om\c\test\main.cpp the synthetic length is 21.

 

This option is provided for both the collect all allocations and collect size restricted options.
 
The default for both options is that allocations of unknown size will be recorded.

 

 

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

 

 

Reset - Resets the settings on the current page.