linux-mips
[Top] [All Lists]

Unused memory

To: linux-mips@fnet.fr, linux@cthulhu.engr.sgi.com
Subject: Unused memory
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Date: Sun, 10 Jan 1999 17:22:59 +0100
Cc: ulfc@bun.falkenberg.se
Sender: owner-linux@cthulhu.engr.sgi.com
Hi,

maybe some of you might remember Ulf Carlsson's test program, which
allocates memory in a loop until it gets an error from malloc(). This
program failed on his Indy long before the machine was really out of 
memory.

I now know the reason for this. Before giving out memory via brk() the
kernel checks, whether there is enough memory. The kernel holds back
(2 + page_cache.min_percent + buffer_mem.min_pecent) percent of the
available memory (see function vm_enough_memory() in mm/mmap.c). Problem
on the Indy is, that num_physpages is wrong by 128MB, because we account
the memory by only looking at the highest page number and forget about 
holes in the memory map. And the Indy has a big hole between 0x80002000 
and 0x88002000 ...

Right now I can't think of a good fix for this problem. Any ideas ?

Thomas.

-- 
   This device has completely bogus header. Compaq scores again :-|
It's a host bridge, but it should be called ghost bridge instead ;^)
                                        [Martin `MJ' Mares on linux-kernel]

<Prev in Thread] Current Thread [Next in Thread>