Boot Options: truncatememory

The truncatememory option sets an upper bound on physical addresses used by Windows.

Syntax

To have the BCDEDIT tool set the truncatememory option for the currently running operating system, run the command

bcdedit /set truncatememory address 

where address is a number given either as a decimal or in C-language hexadecimal notation.

This option is reported at the Edit Boot Options Menu as a command-line switch

/maxmem=address 

which is also the syntax for the option as a BOOT.INI switch in earlier Windows versions. Beware however that for the BOOT.INI switch, address is not an address but a number of MB.

Behaviour

The Loader obtains from the firmware a map of physical memory. For BIOS machines, the means of discovery is int 15h function E820h. The truncatememory option simply tells the Loader to discard from this map every 4KB page that is not entirely below the given address. The discarded pages may as well not have been reported by the firmware.

This processing of the memory map is done very early by the Loader in order to configure its own memory management. Although the truncatememory option is reported in the Edit Boot Options Menu and the corresponding switch, /MAXMEM, can be edited or added, changes are too late to be acted on and are not respected.

The option is passed to the kernel as /MAXMEM but both NTOSKRNL.EXE and NTKRNLPA.EXE ignore it.