Linux 1.3.90 vasts memory?

Hans Georg Zezschwitz (redjack@science-products.com)
Wed, 17 Apr 1996 12:24:33 +0200 (MET DST)


Hi,

probably this is my very own personal problem (starting once with a ZX-81
having 1 kB of RAM):

In 1.3.90 yet another element was introduced to the mem_map-structure:

In mm.h:

+ unsigned long map_nr; /* page->map_nr = page - mem_map */

Well, isn't it like that, that in result for every 4k / 8k page another
4 bytes are used? (-> 0,1 % of RAM is lost?). Sounds less, but thats
4 more pages on the average 16 MB system.

What are the benefits of that? I took a quick look through the code
and my impression is, that it will mostly save a substraction and
division (integer) when

- finding a free page
- allocating a block from a file

Sure, that it is worth this? You could call it an optimization for
speed vs. memory, but every modern OS an optimization for memory
is a optimization for speed on the average system, too.

Sorry, probably the whole thing isn't worth these lines, but I felt
all the time a little bit sick during the 1.3.x developement when
"just a few" other elements for "struct vm_area" or "mem_map"
where introduced.

Greetings,

Georg