• 大小: 19KB
    文件类型: .c
    金币: 1
    下载: 0 次
    发布日期: 2021-01-08
  • 语言: 其他
  • 标签: malloclab  

资源简介

csapp的第7个lab,也是花了我最长时间的lab,用的是分离链表的首次适配,得了94分,具体函数功能都有注释,希望对大家有帮助

资源截图

代码片段和文件信息

/*
 * mm.c
 *
 * Main Idea:
 * data structure : seglist
 * I applied 20 lists here with same length from [2^i2^(i+1)]
 * 
 * for each block if it is allocated store its head and foot;
 * if it is freed aside its head and foot also store *prev and *next
 * (will explain more about this later)
 *
 * fit method : traverse every list and find the first fit free block
 * and search each list by its address since they are in address increasing 
 * order when they are inserted
 *
 * coalesce method : use bounday tag to help coalesce and coalesce immediately
 *
 * 
 *
*/
#include 
#include 
#include 
#include 
#include 

#include “mm.h“
#include “memlib.h“

/* If you want debugging output use the following macro.

评论

共有 条评论

相关资源