Re: Problem with 1G RAM

Rik van Riel (
Fri, 4 Dec 1998 20:39:43 +0100 (CET)

On Fri, 4 Dec 1998, Neil Conway wrote:

> OK, who wants to volunteer to insert a check in the kernel: STOP if
> __PAGE_OFFSET is incompatible with the amount of RAM specified by
> "mem=xxxM" ? Failing that, print a warning, and reduce the RAM to
> (say) 960MB or whatever.

mirkwood:~/linux/arch/i386/kernel# grep MAXMEM *
setup.c:#define MAXMEM ((unsigned long)(-PAGE_OFFSET-VMALLOC_RESERVE))
setup.c: if (memory_end > MAXMEM)
setup.c: memory_end = MAXMEM;

It looks to me that there already is code like this inside
kernel 2.1.131. Question is why it doesn't work correctly.

Let's see what happens:

MAXMEM = -0xC0000000-(64<<20)

The only reason this could go wrong is when something fouls
up with the conversion from a signed to an unsigned number.

In that case:


then again, I may have overlooked something silly :)


Rik -- the flu hits, the flu hits, the flu hits -- MORE
| Linux memory management tour guide. |
| Scouting Vries cubscout leader. |

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at