posted @ 2008-03-25 21:20 ZelluX 阅读(415) | 评论 (7) | 编辑 收藏
posted @ 2008-03-24 21:16 ZelluX 阅读(689) | 评论 (1) | 编辑 收藏
posted @ 2008-03-19 18:03 ZelluX 阅读(358) | 评论 (0) | 编辑 收藏
posted @ 2008-03-15 14:46 ZelluX 阅读(1025) | 评论 (6) | 编辑 收藏
posted @ 2008-02-29 17:50 ZelluX 阅读(364) | 评论 (0) | 编辑 收藏
本来想看完pagefault的处理的,不过实验室有事情了,只能先把这一半放上来了。
页面的分配与回收使用了一个叫做buddy allocator的机制,kernelnewbies上的解释The memory allocation scheme used in the kernel. A vector of lists of free pages is kept, ordered by the size of the chunk (in powers of two). When a chunk is allocated, it is removed from the relevant list. When a chunk is freed back to the free pages pool, it is placed in the relevant list, starting from the top. If it is physically contiguous with a present chunk, they are merged and placed in the list above (i.e. where the chunks are twice the size), and this operation percolates up the vector. As regions are merged whenever possible, this design helps to reduce memory fragmentation.首先在zone_struct{} 中保存了一个free_area_t数组,这个数组记录了各种大小的空闲内存块的信息。include/linux/mmzone.h:
posted @ 2008-02-27 23:29 ZelluX 阅读(688) | 评论 (4) | 编辑 收藏
posted @ 2008-02-27 23:15 ZelluX 阅读(438) | 评论 (0) | 编辑 收藏
posted @ 2008-02-26 19:36 ZelluX 阅读(1289) | 评论 (4) | 编辑 收藏
posted @ 2008-02-26 11:56 ZelluX 阅读(470) | 评论 (0) | 编辑 收藏
posted @ 2008-02-22 13:11 ZelluX 阅读(436) | 评论 (0) | 编辑 收藏
Powered by: BlogJava Copyright © ZelluX