Here we discuss about the memory options at the boot time for a pc.
You can simulate a low-memory environment for testing without changing the amount of physical memory on the computer. Instead, you can limit the memory available to the operating system by using the /burnmemory and /maxmem boot parameters in Windows Server 2003 and Windows XP, and by using truncatememory or removememory options with the BCDedit /set command on Windows Vista.
The /burnmemory parameter, which is available on Windows Server 2003 and Windows XP, reduces the memory available to Windows by the specified amount. It is calibrated in megabytes (MB). Set the value to any amount less than the actual physical memory on the computer.
The /maxmem parameter specifies the maximum amount of memory available to Windows. It is calibrated in megabytes (MB). Set the value to any amount less than the actual physical memory on the computer.
The /maxmem parameter actually determines the largest memory address available to Windows. Due to gaps in the mapping of physical memory, Windows might receive somewhat less memory than the value of /maxmem. For more precision, use /burnmemory.
The truncatememory or removememory options are available on Windows Vista. The truncatememory option disregards all memory at or above the specified physical address. The removememory option reduces memory available to Windows by the specified amount (measured in MB). Both options reduce memory, but the removememory option is better at restricting the operating system to use the specified memory while accounting for memory gaps.
Boot Parameters to Test in a Low-memory Environment in Operating Systems prior to Windows Vista
To simulate a low-memory environment on Windows Server 2003 and Windows XP, add the /burnmemory parameter to a boot entry. Set its value to the amount of physical memory on the system minus the desired memory size for this test.
For example, to limit the memory of a computer with 1 GB of physical memory to a maximum of 128 MB of available memory, set the value of the /burnmemory parameter to 896 (1 GB (1024 MB) - 128 MB = 896 MB).
The first boot entry in the following sample Boot.ini file has the /burnmemory parameter.
[boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Low Memory" /fastdetect /burnmemory=896multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
To add the /burnmemory parameter to a boot entry, use Bootcfg. Because Bootcfg does not have a parameter-specific switch for /burnmemory, use the Bootcfg /raw switch, which allows you to specify any boot parameter for a boot entry.
In the following Bootcfg command, the /raw switch adds the content of the string, "/burnmemory=896" to a boot entry. The /A switch directs Bootcfg to append the string to the entry, rather than replacing all boot parameters for the entry. The /ID switch identifies the boot entry.
bootcfg /raw "/burnmemory=896" /A /ID 1
The following Bootcfg display shows the result of the command on a system with a Boot.ini file.
Boot Entries------------Boot entry ID: 1Friendly Name: "Microsoft Windows XP Professional"Path: multi(0)disk(0)rdisk(0)partition(1)\WINDOWSOS Load Options: /fastdetect /burnmemory=896
Boot Parameters to Test in a Low-memory Environment in Windows Vista
To simulate a low-memory environment on Windows Vista , use the BCDedit /set command and the removememory option to modify a boot entry. Set the value of removememory to the amount of physical memory on the system minus the desired memory size for this test.
For example, to limit the memory of a computer with 2 GB of physical memory to a maximum of 512 MB of available memory, set the value of the removememory parameter to 1536 (1 GB (2048 MB) - 512 MB = 1536 MB).
The following example shows a BCDEdit command used to remove 1536 MB of memory from the total available to the system for the specified boot entry.
bcdedit /set {18b123cd-2bf6-11db-bfae-00e018e2b8db} removememory 1536
You can also use the truncatememory option with the bcdedit /set command to achieve the same result. When you use this option, Windows ignores all memory at or above the specified physical address. Specify the address in bytes. For example, the following command sets the physical address limit at 1 GB for the specified boot entry. You can specify the address in decimal (1073741824) or hexadecimal (0x40000000).
bcdedit /set {18b123cd-2bf6-11db-bfae-00e018e2b8db} truncatememory Ox40000000
Because the removememory option makes more efficient use of system memory, its use is recommended instead of truncatememory.
Boot parameters to debug in a low-memory environment in operating systems prior to Windows Vista
To simulate a low-memory environment on Windows 2000, add the /maxmem parameter to a boot entry. Set its value to the desired memory size for the test.
The first boot entry in the following sample Boot.ini file includes the /maxmem parameter.
[boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Low Memory" /fastdetect /maxmem=128multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
In this example, the /maxmem parameter is used to limit Windows to 128 MB of memory and the computer is configured for debugging with a debug (null modem) cable. This configuration requires two Bootcfg commands.
The first Bootcfg command uses the Bootcfg /addsw (add switch) switch with the /MM argument and a value of 128 to add the /maxmem parameter and to set it to a value of 128 (MB). The /ID switch identifies the boot entry.
bootcfg /addsw /MM 128 /ID 1
The second Bootcfg command uses the Bootcfg /debug switch with a value of ON to add the /debug parameter to the boot entry. It uses the /port switch with a value of COM1 to add the /debugport parameter and to set it to COM1, and it uses the /baud switch with a value of 19200 to add the /baudrate parameter and set it to 19,200 BPS. The /ID parameter identifies the boot entry.
bootcfg /debug ON /port COM1 /baud 19200 /ID 1
The following Bootcfg sample shows the resulting boot entry. The newly added parameters are displayed in bold type.
Boot Entries------------Boot entry ID: 1Friendly Name: "Windows XP 128MB Debug"Path: multi(0)disk(0)rdisk(0)partition(1)\WINDOWSOS Load Options: /fastdetect /maxmem=128 /debug /debugport=COM1 /baudrate=19200
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment