有了内存大小和粒度设置可以获得页数量
典型数据结构
/** 全局描述符表 */
static struct Segment_Descriptor s_GDT[ 16 ];
/** 已经使用的页面数 */
static int s_numAllocated
/** 页 */
struct page {
flag;
pageLink;
}
/** 全部页面数 */
s_numPages
步骤
初始化Init_GDT
初始化一定的Segment_Descriptor
设置代码和数据段
设置GDTR
设置页的使用情况......