Please enable JavaScript to view this site.

Memory Validator Help

 

This section describes the XML tags used to export session data from Memory Validator.

 

Application and program details

 

An exported XML file starts with a few details about Memory Validator and the target program:

 

<XML>

<VALIDATORINFO>Memory Validator information online</VALIDATORINFO>
<VALIDATOR>Memory Validator name</VALIDATOR>
<VALIDATORVERSION>Version</VALIDATORVERSION>
<VALIDATORDATE>Build date</VALIDATORDATE>
<VALIDATORTIME>Build time</VALIDATORTIME>
<TITLE>Target program name</TITLE>
<EXITCODE>Program exit status code and description</EXITCODE>

 

 

Session comparison data groups

 

The regression, improvements and leaks common to both sessions are in the following:

 

<REGRESSIONS>...</REGRESSIONS>
<IMPROVEMENTS>...</IMPROVEMENTS>
<COMMONLEAKS>...</COMMONLEAKS>

 

Allocation types

 

Allocation events are listed in one of three containers

 

<ALLOCATED>...</ALLOCATED>
<REALLOCATED>...</REALLOCATED>
<FREE>...</FREE>

 

Allocation events

 

The next level of tags are shown in optional <EVENT> tags.

 

<EVENT>...</EVENT>

 

You can choose whether to include these event tags or omit them to produce a flat XML structure.

 

The options to omit the event tags are found:

 

on the Session Export dialog

on the Session Compare Export dialog

via the -flatXMLSessionExport option when exporting sessions during regression testing

via the -flatXMLSessionCompareExport option when exporting session comparisons during regression testing
 

Reports that don't include event tags will include all the same inner tags except <ID>.

 

Here's an example for a non-detailed report. The detail report includes thread and timestamp entries:

 

<EVENT>

 <ID>37</ID>
 <File>E:\OM\C\memory32\examples\nativeExample\nativeExample.CPP</File> 
 <Line>161</Line>
 <Address>0x00372d00</Address>
 <Size>0x00000004</Size>
 <AllocType>Allocation</AllocType>
 <Leaked>TRUE</Leaked>
 <Uninitialised>FALSE</Uninitialised>
 <Damaged>FALSE</Damaged>
 <Unused>FALSE</Unused>
 <SizeError>FALSE</SizeError>
 <IncorrectUsage>FALSE</IncorrectUsage>
 <Type>Unknown </Type>
 <AllocationID>166</AllocationID>
 <STACKTRACE>
  <SYMBOL>0x00401905 nativeExample.exe CTeststakApp::CTeststakApp : [E:\OM\C\memory32\examples\nativeExample\nativeExample.CPP Line 161]</SYMBOL>
  <SYMBOL>0x00401e58 nativeExample.exe $E320 : [E:\OM\C\memory32\examples\nativeExample\nativeExample.CPP Line 263]</SYMBOL>
  <SYMBOL>0x00401e33 nativeExample.exe $E323</SYMBOL>
  <SYMBOL>0x1020ad33 MSVCRTD.dll _initterm : [crt0dat.c Line 524]</SYMBOL>
  <SYMBOL>0x00412bfb nativeExample.exe wWinMainCRTStartup : [crtexe.c Line 274]</SYMBOL>
  <SYMBOL>0x7c816d4a KERNEL32.dll RegisterWaitForInputIdle</SYMBOL>
 </STACKTRACE>
</EVENT>

 

Not all of these tags will appear for a given data item in a session.

 

Some of them only appear when certain data items are monitored using Memory Validator.

 

Depending on how you use Memory Validator you may in fact never see some of these tags.

 

All hexadecimal numbers will have leading zeros.

 

<ID> the sequence number of the event in the recorded history of all events

 

<File> the source file location of the allocation event

 

<Line> the source line number in the file  

 

<Address> the hexadecimal address of the allocated object

 

<Size> the hexadecimal size of the allocated object

 

<AllocType> a string indicating allocation, reallocation, etc

 

<Leaked> TRUE or FALSE

 

<Uninitialised> TRUE or FALSE

 

<Damaged> TRUE or FALSE

 

<Unused> TRUE or FALSE

 

<SizeError> TRUE or FALSE

 

<IncorrectUsage> TRUE or FALSE

 

<Type> a string indicating the datatype of the allocated object, if known

 

<AllocationID> the allocation ID of the allocation

 

<Handle> the value of the allocated handle

 

<HandleType> the type of handle allocated, if known

 

<Heap> the handle of the heap from which the allocation was made

 

<BytesOverwrite> the number of bytes overwritten in a buffer overflow/buffer underflow error

 

<Process> the handle of the process which made this allocation
 

<THREAD> the id of the thread in which the allocation was made.

 

<TIME> the timestamp of the allocation. This is a relative 'ticker' time rather than an absolute time, and is not measured in hours/mins/secs.

 

<ReportType> type of trace message

 

<Message> a message from a TRACE() macro or OutputDebugString()

 

<NumWords> the hexadecimal number of words that were found to be uninitialized in a data object

 

<UserData> user specified data for a user defined allocation

 
Only seen for data collected for custom heaps via the API functions mvUserCustomAlloc(), mvUserCustomReAlloc(),  and mvUserCustomFree().

 

<RefCount> user specified data for a user defined allocation
 

Only seen for data collected for custom heaps via the API functions mvUserCustomRefCountDecrement(), and mvUserCustomRefCountIncrement().

 

 

Stacktrace tags

 

The stacktrace for the event is defined in the tags

 

<STACKTRACE>...</STACKTRACE>

 

In the stacktrace are a number of symbols

 
<SYMBOL>symbol data</SYMBOL>

 

The symbol data includes:

 

hexadecimal address

dll/exe name terminated by a semi-colon

function name

filename and line number in square brackets, if known

 

Example (from the XML fragment above):

 

<SYMBOL>0x00401905 nativeExample.exe CTeststakApp::CTeststakApp : [E:\OM\C\memory32\examples\nativeExample\nativeExample.CPP Line 161]</SYMBOL>