自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 Linux 0.11 malloc分析

(1)通过桶的概念来管理内存,每个桶有一个容量size,想分配的内存大小和桶的容量比较,找到相对应的桶。 (2)桶内维护着一个描述符,这个描述符用来管理桶的容量,描述符中的page指向分配的一页内存,freeptr指向空闲的内存链头,refcnt为本描述符内分配出的数量。 (3)描述符占用的空间,是通过free_bucket_desc来获得。当free_bucket_desc没有的时候,通过i

2014-12-12 23:20:47 163

原创 双向链表的简单实现

#include #include struct list { struct list *prev; struct list *next; }; struct list *list_head = {NULL, NULL}; void list_init(struct list *head) { head->next = head; head->pre

2014-09-08 16:45:09 163

原创 单向链表插入实现

#include #include #include struct list { int data; struct list *next; }; struct list *list_reasch(struct list *first, int d) { struct list *p = first; while(p) { if (p->data == d) {

2014-08-31 19:47:20 218

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除