Another kind of memory use can be managed to reduce the memory footprint of a program.
Static memory is data declared statically in the program at compile time.
As is the case with other memory in the system, the fundamental unit of allocation for static data is the page size of the processor. The compiler typically allocates some static data for its own use, so eliminating static data totally is difficult, but knowing how much has been allocated helps you manage it. In some cases, reusing leftover static data space in a page is better than dynamically allocating memory. A Windows CE program allocates two static data segments at compile time, one for variable static data and one for constant static data. Each segment has its own set of pages, which are allocated when the program is loaded into memory.