Setting Up Application Verifier for Always-Running Processes (Windows Embedded CE 6.0)
1/6/2010
The Application Verifier tool can help find memory leaks, including leaks in code that loads at boot time. For information about configuring and running the Application Verifier tool, see Application Verifier Tool.
To set up Application Verifier for Always Running Processes
Install Platform Builder for Windows Embedded CE 6.0 **.
A tools-only install of Platform Builder for CE 6.0 is sufficient because even a tools-only installation includes the Windows Embedded CE 6.0 Test Kit (CETK).
Open the build window, in which you build run-time images.
Optionally, remove or reset all of the security settings, or make sure they are configured properly.
Copy all the AppVerifier binaries to the %_FLATRELEASEDIR% directory.
To automate this step, run the following batch file: %CE_MODULES%\DDTK\DESKTOP\GetAppVerif_CETK.bat.
To perform this step manually, copy the following files to the %_FLATRELEASEDIR% directory:
- AppVerif*
- Shim_*.dll
- Symhlp.dll
- Vlog.dll
- Lmemdebug_autoshim.dll
- Shimeng.dll
In the build window, set the VERIFY_MODULES environment variable by specifying the modules that AppVerifier needs to shim. In the list, include Device.exe and the file name and file name extension of each DLL that you want to test. Separate the file names with spaces, as in the following example:
set``VERIFY_MODULES=device.exe atidrv.dll
If IMGPERSISTENTSTORAGE=1, set IMGSHIMENABLE=1.
Set the VERIFY_OPTIONS=%EnableFanOut%
Run Makeverifyfile.bat. By default, this file is located in the %CE_MODULES%\DDTK\DESKTOP directory.
Run Makeimg.exe. **
Make sure that Makeimg.exe signs all shim DLLs properly. **
Copy the image to flash memory on the device. **
Optionally, connect the device to KITL and then boot the device. KITL is optional, but highly recommended. **
Verify that KITL is connected. If so, text similar to the following appears in the output window:
TID:<address> ++Shim autoloader Found shim 'shim_heap.dll'
To find a leak, take a snapshot, run user scenarios, and then get a delta. The following steps show the typical sequence:
- Boot the device.
- Create a check point on Device.exe by running
heapverif device.exe chk
. - Report the potential leaks since the last check point on device.exe by running
heapverif device.exe delta
. - Repeat these steps to find other leaks.