mm
o_alpha
这个作者很懒,什么都没留下…
展开
-
[linux kernel] do_try_to_free_pages函数解析
/*This is the main entry point to direct page reclaim.If a full scan of the inactive list fails to free enough memory then weare “out of memory” and something needs to be killed.If the caller i...原创 2019-10-16 15:40:32 · 519 阅读 · 0 评论 -
kmalloc详解与分配大小的限制
kmalloc是通过cache来实现的, 只不过每次kmalloc的大小不同, 因此是从不同的cache中分配:/* include/linux/slab.h */// 注意kmalloc是在头文件中定义的static inline void *kmalloc(size_t size, gfp_t flags){ if (__builtin_constant_p(size)) {/*_...转载 2019-07-08 15:49:47 · 4213 阅读 · 1 评论