Memory size change

To change the memory size and exit, use the -c flag of the rmss command.

To change the memory size to 128 MB, for example, use the following:
# rmss -c 128

The memory size is an integer or decimal fraction number of megabytes (for example, 128.25). Additionally, the size must be between 8 MB and the amount of physical real memory in your machine. Depending on the hardware and software configuration, the rmss command may not be able to change the memory size to small sizes, because of the size of inherent system structures such as the kernel. When the rmss command is unable to change to a given memory size, it displays an error message.

The rmss command reduces the effective memory size of a system by stealing free page frames from the list of free frames that is maintained by the VMM. The stolen frames are kept in a pool of unusable frames and are returned to the free frame list when the effective memory size is to be increased. Also, the rmss command dynamically adjusts certain system variables and data structures that must be kept proportional to the effective size of memory.

It may take a short while (up to 15 to 20 seconds) to change the memory size. In general, the more you want to reduce the memory size, the longer the rmss command takes to complete. When successful, the rmss command responds with the following message:
Simulated memory size changed to  128.00 Mb.
To display the current memory size, use the -p flag, as follows:
# rmss -p
The rmss output is as follows:
Simulated memory size is  128.00 Mb.
Finally, if you want to reset the memory size to the actual memory size of the machine, use the -r flag, as follows:
# rmss -r

No matter what the current simulated memory size, using the -r flag sets the memory size to be the physical real memory size of the machine.

Because this example was run on a 256 MB machine, the rmss command responded as follows:

Simulated memory size changed to  256.00 Mb.
Note: The rmss command reports usable real memory. On machines that contain bad memory or memory that is in use, the rmss command reports the amount of real memory as the amount of physical real memory minus the memory that is bad or in use by the system. For example, the rmss -r command might report:
Simulated memory size changed to 79.9062 Mb.

This could be a result of some pages being marked bad or a result of a device that is reserving some pages for its own use and thus not available to the user.