Share via


RAM, ROM, and Mass Storage Comparison (Windows CE 5.0)

The following table shows the common use of various types of memory on a target device.

Memory type Description Use
RAM RAM accommodates an object store and program memory.

The object store resembles a permanent RAM disk. Data is retained when the OS suspends. A target device typically has a backup power supply for memory, which preserves data if power from the primary power supply is interrupted. For more information about the object store, see Object Store.

Program memory is similar to RAM in a desktop computer. Program memory stores heaps and stacks for the applications that are running.

An application is paged to RAM and then executed.
ROM Stores the OS and applications that are included with the OS. If the data is not compressed, an application executes in place (XIP).

If the data is compressed, an application is decompressed, paged to RAM, and then executed.

Flash Typically used for data storage and can be used for program storage. An application is paged to RAM and then executed.

An application stored in flash memory is handled in the same manner as an application stored in ROM.

If an application runs directly from ROM, RAM is conserved. The application also runs sooner because the data does not need to be copied to RAM.

Consider the speed of the flash memory and RAM in a target device when optimizing the target device. The following table shows ways to execute an application that is stored in flash memory.

Method of execution Description of process
Application is copied to RAM and then executed Compress the dynamic-link library (DLL) or executable file or move the file to the MODULES section. For more information, see MODULES Section.

This approach introduces overhead while the module loads, but with the faster speed of RAM, the application executes more quickly after it loads.

Application is XIP XIP reduces the amount of RAM used, but the application runs more slowly than it would from RAM.

When using flash memory, you should add a separate boot ROM to a release device. For more information, see Boot Loaders.

For a mass storage device, you should allocate an appropriate amount of RAM to the cache for the storage device. The larger the mass storage device, the larger the cache should be. The settings that determine the cache size are stored in the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FATFS registry key.

The following table shows an appropriate amount of RAM to allocate to the cache for a storage device, and the corresponding registry entry that specifies the cache size.

Registry entry Number of sectors Cache size in kilobytes (KB)
2 2 1
4 4 2
8 8 4
10 16 8
20 16 32
40 64 32
80  128 64
100 256 128
200 512 256
400 1024 512
800 2048 1024
1000 4096 2048

See Also

Troubleshooting: Performance Insufficient

Last updated on Thursday, February 02, 2006

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.