資源簡介
csapp的第7個lab,也是花了我最長時間的lab,用的是分離鏈表的首次適配,得了94分,具體函數(shù)功能都有注釋,希望對大家有幫助
代碼片段和文件信息
/*
?*?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.
- 上一篇:基于VHDL_的數(shù)字密碼鎖設計
- 下一篇:虛擬儀器的發(fā)展前景
評論
共有 條評論