Share via


Static Data Blocks (Windows Embedded CE 6.0)

1/6/2010

The static data block is a block of memory that Windows Embedded CE loads with an application. This block contains strings, buffers, and other static values that the application references throughout its life. Windows Embedded CE allocates two sections for static data: one for read/write data and one for read-only data.

Because the OS allocates these areas on a per-page basis, typically there is some space left over from the static data up to the next page boundary. When writing an application for a Windows Embedded CEā€“based device, be sure that little or no extra space is left. It might be better to move a buffer or two into the static data area, rather than allocating those buffers dynamically, if there is space in the static data area.

You can see how much area is available by the use of dumpbin / headers on the binary file to see how big the .data section is. You can add more static data so the page size will round up, as shown in the following code example:

C:\YamaSMP\ARMV4I\REALVIEWEB_MPCORE\cebase>dumpbin /headers fsdmgr.dll <some output omitted> SECTION HEADER #2
   .data name
      930 virtual size
   40000 virtual address (10040000 to 1004092F)
      800 size of raw data
   3E800 file pointer to raw data (0003E800 to 0003EFFF)
      0 file pointer to relocation table
      0 file pointer to line numbers
      0 number of relocations
      0 number of line numbers
   C0000040 flags
      Initialized Data
      Read Write
<some output omitted>

In this output, you can see that the virtual size of the .data is 0x930 and that it occupies a page (0x1000). You can create more static buffer up to (0x1000-0x930) without increasing memory usage.

See Also

Concepts

Memory Architecture