没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
试读
7页
In this lab you will be writing a dynamic storage allocator for C programs, i.e., your own version of the malloc and free routines. It is quite involved. Start early! We are providing some extra homeworkstyle practice problems for memory allocation in case you find them helpful in preparing for lab 5. They will not be graded (no credit), they are just good practice. Read section 9.9 from the textbook for review. (Note "word" means 4 bytes for these problems.) 1.Practice Problem 9.6 2.Practice Problem 9.7 3.Practice Problem 9.10 4.Homework Problem 9.15 5.Homework Problem 9.16
资源推荐
资源详情
资源评论
2014年9月7日 CSE 351 Course Website - Spring 2014
http://courses.cs.washington.edu/courses/cse351/14sp/lab-5.html 1/7
Lab5:WritingaDynamicStorageAllocator
Assigned Wednesday,May28,2014
DueDate Friday,June6,2014at5:00pm
Files lab5.tar.gz(labs/lab5/lab5.tar.gz)
Submissions
Submityourcompletedmm.cfilehere
(https://catalyst.uw.edu/collectit/assignment/gaetano/31190/125998).
Overview
InthislabyouwillbewritingadynamicstorageallocatorforCprograms,i.e.,yourownversionofthemallocandfree
routines.Itisquiteinvolved.Startearly!
OptionalPracticeProblems
Weareprovidingsomeextrahomeworkstylepracticeproblemsformemoryallocationincaseyoufindthemhelpfulin
preparingforlab5.Theywillnotbegraded(nocredit),theyarejustgoodpractice.Readsection9.9fromthetextbookfor
review.(Note"word"means4bytesfortheseproblems.)
1. PracticeProblem9.6
2. PracticeProblem9.7
3. PracticeProblem9.10
4. HomeworkProblem9.15
5. HomeworkProblem9.16
Instructions
Startbyextractinglab5.tar.gztoadirectorywhereyouplantodoyourwork:
wget cs.washington.edu/education/courses/cse351/14sp/labs/lab5/lab5.tar.gz
tar xzvf lab5.tar.gz
Thiswillcauseanumberoffilestobeunpackedinadirectorycalledlab5.Theonlyfileyouwillmodifyandturninismm.c.
(Inthefollowinginstructions,wewillassumethatyouareexecutingprogramsinyourlocaldirectoryonattuoryourVM.For
thislab,youcanworkanywherethere'saCcompilerandmake,includingyourVM.)
Yourdynamicstorageallocatorwillconsistofthefollowingthreefunctions(andseveralhelperfunctions),whichare
declaredinmm.handdefinedinmm.c:
int mm_init(void);
void* mm_malloc(size_t size);
void mm_free(void* ptr);
Themm.cfilewehavegivenyoupartiallyimplementsanallocatorusinganexplicitfreelist.Yourjobistocompletethis
implementationbyfillingoutmm_malloc()andmm_free().Thethreemainmemorymanagementfunctionsshouldworkas
follows:
资源评论
- IT贩子2018-12-26"http://www.csapp.cs.cmu.edu/"上面的英文稿,几乎没有什么参考价值,有赚积分的嫌疑!
JasonLeaster
- 粉丝: 580
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功