Sealevel’s R9 family of products are capable of running Windows CE 6.0 with the .NET Compact Framework 3.5. The .NET Compact Framework is a subset of the .NET Framework that has been optimized to run on embedded systems with limited resources such as the R9 family. Visual Studio provides a standard interface for debugging application code; however, there is no built-in method to aid in analyzing memory usage. This makes developing memory efficient applications a real challenge. Fortunately, Microsoft has released a set of tools that will aid in identifying and isolating problematic code and memory leaks: Power Toys for .NET Compact Framework.
The collection of analysis tools can be installed on any workstation and do not require the full suite of Visual Studio development tools. To begin using the Power Toys, the .NET Compact Framework must be installed. Once the utilities and their dependencies are installed, an application’s memory usage can be analyzed through an ActiveSync connection.
The .NET CF Remote Performance Monitor is one analysis tool included in the Power Toys collection. This utility is useful for monitoring applications statistics and counters on-the-fly. The counters available will provide valuable information on the behavior of the garbage collector in relation to an application. One of the really useful features of this utility is the ability to export the data to Window’s performance monitor. This integration allows application statistics to be graphed over time very easily. This makes identification of memory leaks a trivial task.
Another useful tool in the Power Toys collection is the .NET CF CLR Profiler. This utility is helpful in isolating the portions of code responsible for memory leaks and performance bottlenecks. The tool allows one to graphically explore an application’s runtime memory allocations as they relate to various method calls. It is also possible to explore the application’s heap at any point during execution. This tool makes it much easier to determine which methods can be optimized to decrease memory allocations and thereby improve application stability and performance.
The tools contained in the .NET Compact Framework Power Toys collection can be very useful to analyze application code when executing on resource limited embedded systems. There are some other useful tools included in the .NET Compact Framework Power Toys, but for the sake of brevity, this article will not cover them. It is important to note that application performance will be significantly reduced for most applications being analyzed by the tools mentioned in this article.
For more information, check out the sites below: