FSRAMPERCENT (Windows Embedded CE 6.0)

1/5/2010

This configuration option specifies the percentage of RAM allocated for the file system.

This option uses the following syntax.

FSRAMPERCENT = number

Parameters

  • number
    A 4-byte hexadecimal number.

    Each byte represents the number of 4-KB blocks per MB allocated for the file system, as follows:

    byte 0 = # of 4-KB blocks per MB in the first two MB

    byte 1 = # of 4-KB blocks per MB in the second two MB

    byte 2 = # of 4-KB blocks per MB in the third two MB

    byte 3 = # of 4-KB blocks per MB in the remaining memory

Remarks

You can use FSRAMPERCENT to specify 16 to 255 4-KB blocks of memory. Although the memory is calculated in 4-KB blocks, the actual allocation is a contiguous section of RAM.

The minimum size for FSRAMPERCENT** is 32 KB, or 0x00000004.

The default is FSRAMPERCENT=0x80808080, which specifies 50 percent of RAM allocated for the file system.

You can calculate the percentage of RAM is reserved by FSRAMPERCENT by dividing the amount of memory reserved in each byte by 1MB. For example, if FSRAMPERCENT is 0x20202020, each byte reserves 0x20 x 4KB = 128KB. 128KB divided by 1MB is .125, or 12.5% of the ram.

You can also calculate the value of FSRAMPERCENT from the desired percentage of RAM to be used in the file system. For example, if you want to reserve 12.5% of RAM for the file system, you would set each byte of FSRAMPERCENT to ((12.5% / 100) * (1MB / 4KB)), or 12.5% * 2.56. This example works out to 32, or 0x20. You would then set the 4-byte value of FSRAMPERCENT to 0x20202020.

The following code example shows how to use FSRAMPERCENT to allocate available RAM to the file system.

FSRAMPERCENT=0x10203040

In this example, 64 4KB chunks are allocated to byte 0. 48 4KB chunks are allocated to byte 1, 32 4KB chunks are allocated to byte 2, and 16 4KB chunks are allocated to byte 3. The total percentage of memory reserved for the file system would be ((64 + 48 + 32 + 16) * 4KB) / 4MB, or 15.6%.

The OAL now provides the function pointer pOEMCalcFSPages to change the default number of pages assigned to the object store during a cold boot. The minimum size for the object store is 32 KB and the maximum size is 128 MB.**

See Also

Concepts

CONFIG Section
Binary Image Builder File