




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
关键字:内存资源;分配;存储管理;回收
......................................................................................................
.....................................................................................
....................................................................................
....................................................................................
....................................................................................
.........................................................................................
.............................................................................
.............................................................................
...........................................................................
...........................................................................
...........................................................................
...........................................................................
...................................................................................
.............................................................................................
........................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
....................................................................
.................................................................................................
.....................................................................................................
................................................................................................
....................................................................................................
关键字:内存资源;分配;存储管理;回收
1.1
设计任务
1.2
设计思想1.3
基础知识
2.1
主程序
Y
2.2
创建进程模块
tapplyIndex=new
assignPointer=new
int[ProcessNum];//maxApplyNum=ProcessNum;
2.3
进程信息模块
return
ERROR
ifpro->status==-1
ifpro->status==-2
2.4
进程申请模块
2.5
分区创建模块
return
ERRORp=head->next
return
2.6
内存分配模块
p=head->next
if(count==1)
SIZE
Y
YY
2.7
低级调度模块
,
Randomcreatpro()
4.1
主界面调试结果
4.2
创建进程调试结果
4.3
进程信息调试结果
4.4
进程申请调试结果
4.5
分区创建调试结果
4.6
内存分配调试结果
4.7
内存回收调试结果
4.8
打印分区调试结果
4.9
低级调度调试结果
cpucpu
#include<iomanip.h>#include<time.h>
SUCCESS
ERROR
byte;
byte
subareaSize;//
}SubareaTable;//
SubareaTable
subarea;//
byte
subareaSize[num]={8,12,16,32,24,16,64,128,40,64};//
maxApplyNum=0;//
*applyIndex=NULL;//
totalApplyNum=0;//
*assignPointer=NULL;//
assignFlag=0;//
*subareaNode=new
Node[3];//
);//
orderIndex,int
flagNode);//
assignMemory(LinkList
&head);//
index);//
deleteNode(LinkList
index);//
&head);//
findSubarea(LinkList
index);//
menu();//
creatProcess();//
--------------"<<endl;
return
head->next=NULL;//
i=1;i<=n;i++){p=(Node)malloc(sizeof(node));return
start+=subareaSize[i-1];return
p=head->next;//
return
return
return
p=head;//while(p!=flag){//if(p==flag){//return
return
return
p=head->next;//
return
if(count==1){//
}while(p!=NULL);return
p=head->next;//
return
if(p->status==0){
if(count==1){//}while(p!=NULL);return
return
";return;
p=head->next;p->next=q;//j=q->subarea.index;//j
q=q->next;//j=q->subarea.index;
deleteNode(LinkList
p=head;//
return
findSubarea(LinkList
p=head->next;//return
ERROR;
for(;p;j++) if(j>=index-1)break;
i=0;i<3;i++){return
SUCCESS;
&head){// --------------"<<endl;
return
ERROR;p=head->next;
return
SUCCESS;
--------------"<<endl;return
ERROR;
cout<<i+1<<":"<<setw(6)<<pro->processSize<<" if(pro->status==0){";
if(pro->status==1){//";
if(pro->status==-1){";
if(pro->status==2){";
if(pro->status==-2){
";return
SUCCESS;
applyforProcess(){ --------------"<<endl;
return
ERROR;";cin>>applyProcessNum;cin>>applyProcessNum;
i=0;i<applyProcessNum;){cin>>index;pro+=(index-1);//if(pro->status==0){
maxApplyNum--;return
SUCCESS;
assignMemory(LinkList
&head){//
flagNode;return
ERROR;cout<<setw(10)<<"1.cout<<setw(10)<<"2.cout<<setw(10)<<"3.cout<<setw(10)<<"4.cout<<"**************************"<<endl;cin>>n;
applyIndex+=assignFlag;//
assignPointer[i]=*applyIndex;//return
SUCCESS;
orderIndex,int
flagNode){
switch(orderIndex){
pro-=index;//if(assignNode!=NULL){//
node=(Node)malloc(sizeof(node));SubareaTableprocessSize;//node->status=0;//insertNode(head,
assignNode->subarea.index+1);//assignNode->status=1;//
return
return
j=p->subarea.index;//
[1]->subarea.subareaSize);//
p=subareaNode[1];
j=p->subarea.index;
j=p->subarea.index;
callbackMemory(LinkList
char
cin>>n;}while(n!='y'&n!='Y'&n!='n'&n!='N');if(subareaNode[2]!=NULL){
amendNodedata(subareaNode[0],subareaNode[2]);
if(subareaNode[0]==NULL){a.subareaSize;
return
SUCCESS
return
ERROR;
--------------"<<endl;";return
ERROR;
cin>>n;}while(n<1||n>ProcessNum||(pro+n-1)->status!=2);(pro+n-1)->status=1;//
return
SUCCESS;
cout<<"*********************cout<<setw(30)<<"1.cout<<setw(30)<<"2.cout<<setw(30)<<"3.cout<<setw(30)<<"4.cout<<setw(30)<<"5.cout<<setw(30)<
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 电功率测试题及答案
- 云南叉车实训考试试题及答案
- 智能照明考试题及答案
- 药学编制考试试题及答案
- 临床器械面试题及答案
- 中考污染试题及答案
- 车马兵考试题及答案
- 汽车文化考试题及答案
- 2025年防灾减灾科学与工程专业毕业设计开题报告
- 2025年肺部诊断学试题及答案解析
- Unit1SectionA1a-1c课件-人教版九年级英语全册
- 2025北京大兴区兴丰街道招聘临时辅助用工人员4人考前自测高频考点模拟试题及参考答案详解1套
- 360上网行为管理系统产品白皮书
- 2025年消防员专业面试题及答案
- 景区物业服务运营方案(3篇)
- 自行缴纳社保协议书模板
- 游船安全培训课件
- DB3713-T 344-2024 古树名木管护复壮技术规程
- 护士条例培训
- 制作历史教学课件
- 建筑工程施工质量验收统一标准
评论
0/150
提交评论