Chris De Herrera's Windows CE Website

About
Discuss.Pocket PC FAQ Forum

Add Pocket PC FAQ to your Favorites
RSS    RSS Feeds
Wiki    Lost?
Custom Search
Subscribe    Print
Miscellaneous
Table of Contents
Mobile Format
News

[an error occurred while processing this directive]


 
Pocket PC Magazine Best Site

Website Awards
Website Updates

By Chris De Herrera 
Copyright 1998-2007
 All Rights Reserved
A member of the Talksites Family of Websites

Windows and Windows CE are trademarks of Microsoft
Corporation
and are used
under license from owner.
CEWindows.NET is not
associated with Microsoft 
Corporation.

All Trademarks are owned
by their respective companies.

RAM FAQ
By Chris De Herrera, Copyright 2001
 Version 1.00  Revised 6/17/2001

[an error occurred while processing this directive]

Introduction

So you've got a Pocket PC, Handheld PC or Palm-size PC and you want to know more about how ram is used on it.  This FAQ covers common issues and solutions for how ram is used.

What is RAM?

RAM is Random Access Memory. In the case of a Handheld PC, Palm-size PC or Pocket PC, it is used differently than it is on a desktop PC. The RAM on your device is battery backed up. This means that as long as the unit still has power, your data and programs that are running are kept exactly where you left them.  So if the battery is completely depleted (like when you go on vacation and forget to leave your device in the charger) all your data will probably be lost.  I suggest you perform regular backups of your device to allow you to restore your data. 

What is RAM Used For?

The RAM is used for multiple areas in the device.  First, RAM is divided into 2 sections.  One is for data storage and the other is for program execution. I have covered the data storage aspects of the ram in the Storage FAQ.  The program execution is where the program is loaded after you have selected it from the menu and told the system to run it.  The Handheld PC and Palm-size PC require the user to manually adjust the amount of ram for storing data and running programs.  I suggest you use approximately 8 Mb for running applications and the rest for storage whenever possible. On older systems with less ram, try splitting the ram evenly between storage and execution. The ram settings are adjusted in Control Panel - Memory by sliding the slider according to what you want.  Ram is automatically managed on the Pocket PC so if you adjust it, the system will re-adjust it depending on what you are running or storing at any given time.

Executing a Program

Each program on the Pocket PC is loaded into it's own ram slot. There are 33 RAM slots in the Windows CE memory architecture. Each of these slots can be up to 32 MB in size for a total of approximately 1 GB. So the largest program for Windows CE is approximately 32 MB.  The first slot (slot 0) is where the currently running program is at any given time.  These 33 slots are all composed of virtual memory. Virtual memory in the Windows CE operating system means that memory is allocated for programs that are running on a page (usually 4k in size) by page basis.   The system reclaims pages that are no longer being used so that they can be used by other programs. Pages that have data that has been written to them do not get reclaimed since there is no swap file to write the data to temporarily.  This concept is radically different than the desktop.  Also, the Windows CE operating system can close applications that are no longer being used in the foreground to release ram as well.  For example the Pocket PC never has more than 10 applications running at any given time even though the operation system can support more.

Looking for Program Memory Leaks

So you see the ram fluctuate radically between loading and running programs.  Since ram is allocated in pages and the initial loading of the program requires the most ram, the amount of free ram will vary dramatically. This is not a memory leak.  Basically if you close all the programs you will free up all the ram.  There is one exception for loading DLLs that are used by the system. These are only completely unloaded in the event of a soft reset.  So if you need all your ram as available as possible, consider a soft reset.  

Conclusion

Now you have a better idea of how ram is used in Windows CE.  There is sophisticated memory management occurring which manages the ram to make your device as efficient as possible.

[an error occurred while processing this directive]

Return to Chris De Herrera's Windows CE Website