This blog is initiated to share my working experiences on Windows CE and Windows mobile. I intend to reproduce, in most simple language, intersting facts and insights that I unearth in my day to day spade-WORK.

Detecting Memory leaks in CE

Memory leaks dont need an introduction here. Those looking for a definition may bypass the rest of this discussion.

Even a novice programmer would have seen couple of them every now and then, slowing overall system performance, and in some cases causing catastrophic fatalities like process and or system hangup!

I chanced to work on the CE6 lab(MS curriculum) on tools for detecting memory leaks in CE based systems, and wondered if ppl around were aware of these comprehensive tools? .... I simply was'nt, till the time I actually had to write about them.

Why is Memory Management so important in CE?
To start with, the simplest reason is Embedded systems are designed with memory constraints, having just enough memory to do the job........... essentially implying we have li'l memory to fool around with!

Another reason is that Embedded Systems, unlike their desktop siblings, run continuously for longer durations of time... some are designed to be kept powered up for months. Even small memory leaks in applications, in a recurrect fashion, lead to complete memory fallout in some unpredictable time.

Bottom line: Memory Leaks in embedded systems...... are deadly!!

Over the next couple of days, I would write on some of the tools I have used to detect and fix memory leaks in my applications. To start with, the first is on the Remote Application Verifier.

CE 6 Emulator

Hi,

I have been working on CE6 Beta after setup(VS2005 and CE6 Beta plugin) over the last couple of days.

The new ARMV4I device emulator raised some queries on my mind. It was intriguing to me how a ARM based emulator(as the name suggests) worked on an x86 machine.

A li'l spadework on the Microsoft team... and pop came the answer: The new device emulator is basically "just an application" that converts ARM instructions to win32 API's and x86 system calls..... precisely the reason emulator works on virtual PC, used in MSDN virtual labs.

This feature is definitely a boon..... considering the learning fom first CE6 virtual lab..... and this is not the end, there are more labs coming up from the author in due time.

BTW, for those struggling to get CE6 OS images run on device emulator(DMA) on their own machines, there is a small change you need to make.

In the Paltform directory of CE6, browse to DEVICEEMULATOR folder, open deviceemulator.bat for edit, and change:

set BSP_KITL_ETHERNET=1
set BSP_KITL_DMA=

to

set BSP_KITL_ETHERNET=
set BSP_KITL_DMA=1

Now build the code using Build Solution option in Build menu. This should configure the KITL to transport over DMA, handy for debug images.

The CE6 virtual lab already had this setting in place!

CE 6 Virtual Lab

Hi,

For all waiting to get their hands on CE6 asap, but cud'nt get the VS2005 or CE6 Beta DVD yet, here is a great virtual lab in MSDN from Mike Hall at Microsoft:

http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032304834&EventCategory=3&culture=en-US&CountryCode=US

It does'nt require you to spend hours installing VS2005 or CE6.... it has a virtual PC with both installed!

I tried it some time back... I must commend on the carefully designed contents. It covers configuring, building, and debugging an operating system image as well as new features of Platform Builder, including the new registry editor. It also uses the new ARMV4I based Device Emulator.

Just log in and make the most it.

Welcome

Hi All,

Thanks for visiting my "under construction" page.

Over the next couple of days, I'll be posting more on myself.... personal and professional.

.... watch this space for more!

-Tarun Nigam