Please enable JavaScript to view this site.

Memory Validator Help

The Sizes tab summarises all the allocations in the target program by their size, as opposed to by type.

 

interactiveClick a part of the image below to jump straight to the help for that area.

 

sizes-tab-with-menu

 

 

The display shows information about allocations in threads, allocations in DLLs, allocations for each watermark set in the session and allocations tracked by tag trackers.

 

The view lists of all the objects in the program in size order with the numbers of each allocated as well as other information.

 

As in the types tab, here you can constrain the objects shown to those in particular threads or DLLs, and those between watermarks or being tracked by tag trackers.

 

note The features here are roughly a subset of those on the Types tab. If you're going through this help and already read the about the Types tab, you could skip this topic and go on to the Timeline tab if you wish.

 

 

Size tabs

 

At the top of the Size tab is a set of four tabs, each filtering which object sizes are shown in the table.

 

sizes-tabs

 

Thread instructionStep show stats for an individual thread in the list or All threads (the default)

 

DLL instructionStep show stats for a chosen DLL or All of them (the default)

 

Watermark instructionStep filter the display to show objects used between two watermarks

 

Tag Tracker instructionStep display stats for an individual tag tracker or for All trackers

 

 

 

Colours used in the display

 

Each row is coloured according to whether the object has:

 

objects-colours-red  an increasing count for the number of live objects of the size

objects-colours-blue  a decreasing count

objects-colours-gray  a static count

objects-colours-white  a zero count - i.e. where all allocated objects of the size have been freed

 

The importance of each value within the column is highlighted with a percentage bar:

 

objects-colours-dkgreen  the object size with the maximum value in a given column (not shown for all columns)

objects-colours-green  relative contribution of the value in each column

 

seeAlsoSee also the Data Highlighting settings dialog to customise the first two colours.

 

 

The size data columns

 

The data in each column for all types of allocation are summarised below:

 

Some of the header columns display a total for the column underneath the column name.

 

Size

Count

Max

Cumulative

Total

Cum Total

Seq 1

Add Seq

Del Seq

Cur Seq

Activity

object size  

number of live allocations of each size

maximum number of live allocations

cumulative number of allocations

running (live) total size (Size x Count)

cumulative total size (Size x Cumulative)

sequence id of first allocation of this size

id of most recent allocation

id of most recent deallocation

id of most recent allocation or deallocation

the span between first and most recent event sequence ids

 

To best explain the numbers in each column we'll use a simple example scenario which has a series of char[] allocations and deallocations shown in order of their event sequence id.

 

This event sequence below (not actual code) will be used to demonstrate how some of the figures in the columns would change with each event. Note this would leak allocations s4 and s5.

 

objects-column-example

 

 

Size

 

The size is simply that of the allocated memory. Many different types of objects may have the same size, especially the smaller sizes.

 

When a size cannot be determined, a size of -1 may be used:

 

Zero is a valid allocation size, for example new char[0] or SysAllocString(L"").

 

 

Count, Max and Cumulative

 

Count instructionStep the number of live objects of each size, so in our example the count for objects of size 10 increases and decreases, resulting in an overall increase of 1

 

Max instructionStep the maximum value that the count ever reaches - i.e. the peak number of live objects of each size at any one time

 

Cumulative instructionStep increases with every single allocation, giving a historical total

 

sizes-column-example-count-max-cum

 

 

Total and Cumulative Total

 

Total instructionStep the running total gives the total size of all live objects of each type. This is simply Size * Count

 

C Total instructionStep the cumulative total tells you how much of each type has ever been allocated. This is Size * Cumulative

 

sizes-column-example-rtotal-ctotal

 

 

Sequence numbers: Seq 1, Add Seq, Del Seq and Cur Seq

 

The sequence numbers show significant event sequence ids relating to each size of object:

 

Seq 1 instructionStep the first allocation sequence id for each object size

 

Add Seq instructionStep the sequence id for the most recent allocation
 

Del Seq instructionStep the sequence id for the most recent deallocation

 

If no objects of a given size have ever been deleted, the value just shows a hyphen

 

Cur Seq instructionStep the most recent event sequence id related to each object size - usually the greater of Add Seq or Del Seq

 

sizes-column-example-seq

 

Looking at the values for the range Seq 1 to Cur Seq helps give an indication of the span of activity of each size of object.

 

 

Event sequence id markers

 

The four sequence id columns show markers visualizing the event's position relative to the the total number of events so far.

 

Each row shows green markers denoting the relative position of the first and most recent sequence ids for the objects of each size.

 

In the following example there have been approximately 3000 events to date:

 

objects-tab-seq-markers

 

These markers can help you see the relative timing and order of object size allocation and deallocation much more quickly than scanning through the numbers alone.

 

 

Object activity

 

The 'activity' of an object size is the span between its first allocation id and the most recent event sequence id at which at least one object of that size was still live.

 

The Activity column in the view shows a graph of that lifespan, with the value being the number of events spanned:

 

seeAlsoSee also, explanatory examples of the graphs in the Types view.

 

objects-tab-activity

 

 

Sorting columns

 

Sorted columns are highlighted yellow. Just click on the column header to change the sorting column or it's sort direction order.

 

The sorted column takes effect in each of the five object tab views, Thread, DLL, etc.

 

 

Size tab options

 

Each of the four size tab views has different options at the top, with Tag Tracker Macro having none.

 

objects-thread-options   objects-dll-options   objects-wm-options   objects-tag-options

 

The first two tabs allow you to choose a single Thread or DLL for which to show object types used.

 

The Memory tab topic describes use of the Watermark and Tracker options in detail.

 

The following options are common to all five tabs:

 
sizes-common-options

 

 

Updating the display

 

Update Interval (s) instructionStep automatically updates the display at your choice of interval between 0.1 and 60 seconds - or never!

 

Refresh instructionStep updates the display - as does the refresh button on the Tools menu and toolbar

 

With an update interval set to Never, you'll need to use this Refresh button to update the display.

 

 

Display settings

 

Display... instructionStep shows the Data Highlighting settings dialog to set the appearance of rows in the table depending on the object count and whether it's increasing or decreasing

 

 

Sizes view popup menuright_mouse_button

 

The following popup menu provides options for examine data in more detail in the Analysis tab.

 

sizes-menu

 

 

right_mouse_buttonMenu option: Showing locations - drilling down into the data

 

The following three options all open the Analysis Tab, adding a callstack for every allocation or deallocation of the selected object size.

 

This enables a deeper inspection of where and how objects of this size are allocated or freed.

 

Show Allocation Locations instructionStep shows allocations only
 

Show Deallocation Locations instructionStep shows deallocations only
 

Show Allocation and Deallocation Locations instructionStep shows both

 

For example, showing allocations for the following row in the Sizes tab will show the callstacks for four allocations and one reallocation of 36 bytes in the Analysis tab below:

 

sizes-show-in-analysis1

 

sizes-show-in-analysis2