文章目录
内存管理续
- Linux0.11版内核中页表初始化
- 虚拟内存
- 分段机制
1.Linux0.11版内核中启动时页表初始化过程
声明
Linux0.11版内核只能管理16M内存,一个页4KB,那么一个页表可管理4MB内存,所以只需要4个页表即可管理所有内存,然后加一个页目录(一级页表、外表)。
所以设置页表的时候需要设置:一个页目录+4个页表
首先看下有关数据的声明:
/*
* linux/boot/head.s
*
* (C) 1991 Linus Torvalds
*/
/*
* head.s contains the 32-bit startup code.
*
* NOTE!!! Startup happens at absolute address 0x00000000, which is also where
* the page directory will exist. The startup code will be overwritten