Specifications

The `mem=' Argument
This argument has several purposes: The original purpose was to specify the amount of installed memory (or a
value less than that if you wanted to limit the amount of memory available to linux).
The next (and hardly used) purpose is to specify mem=nopentium which tells the Linux kernel to not use
the 4MB page table performance feature. If you want to use it for both purposes, use a separate mem= for each
one.
The original BIOS call defined in the PC specification that returns the amount of installed memory was only
designed to be able to report up to 64MB. (Yes, another lack of foresight, just like the 1024 cylinder disks...
sigh.) Linux uses this BIOS call at boot to determine how much memory is installed. A newer specification
(e820) allows the BIOS to get this right on most machines nowadays. If you have more than 64MB of RAM
installed on an older machine, you can use this boot argument to tell Linux how much memory you have.
Here is a quote from Linus on the usage of the mem= parameter.
``The kernel will accept any `mem=xx' parameter you give it, and if it turns out that you lied to it, it will crash
horribly sooner or later. The parameter indicates the highest addressable RAM address, so `mem=0x1000000'
means you have 16MB of memory, for example. For a 96MB machine this would be `mem=0x6000000'. If
you tell Linux that it has more memory than it actually does have, bad things will happen: maybe not at once,
but surely eventually.''
Note that the argument does not have to be in hex, and the suffixes `k' and `M' (case insensitive) can be used
to specify kilobytes and Megabytes, respectively. (A `k' will cause a 10 bit shift on your value, and a `M' will
cause a 20 bit shift.) A typical example for a 128MB machine would be "mem=128m".
In some cases, the memory reported via e820 can also be wrong, and so the mem=exactmap was added.
You use this in conjunction with specifying an exact memory map, such as:
mem=exactmap mem=640K@0 mem=1023M@1M
for a 1GB machine with the usual 384k of ISA memory mapped I/O space excluded from use.
The `memfrac=' Argument
Memory is broken down into zones; on i386 these zones correspond to `DMA' (for legacy ISA devices that
can only address up to 16MB via DMA); `Normal' for memory from 16MB up to 1GB, and `HighMem' for
memory beyond 1GB (assuming your kernel was built with high mem support enabled). The two (or three)
integers supplied here determine how much memory in each zone should be kept free − with the size of the
zone divided by the number supplied being used as the minimum (so smaller numbers mean keep more free in
the zone). The defaults are currently memfrac=32,128,128.
The `swap=' Argument
This allows the user to tune some of the virtual memory (VM) parameters that are related to swapping to disk.
It accepts the following eight parameters:
MAX_PAGE_AGE
PAGE_ADVANCE
PAGE_DECLINE
The Linux BootPrompt−HowTo
The `mem=' Argument 11