操作系统 文件存储空间管理(12)
时间:2026-01-14
时间:2026-01-14
操作系统 文件存储空间管理 c++代码
}
else /*没有其它空闲块组*/
{ printf("\nThere isn't any space");
return;
}
}
else /*当前组已分配完*/
{ for(i=0;i<=3;i++)
MA[i]=A[0][i];
assign();
}
display(); /*显示分组情况*/
}
void callback() /*回收空闲块*/
{ int i,j,temp;
printf("\ninput the No. of the block you want to callback:");
scanf("%d",&j);
getchar(); /*得到待回收的空闲块号*/
for(temp=1;temp<=No;temp++)
{ if(mark[temp]==j)
break;
}
if(temp<No+1) /*若该空闲块已在,退出*/
{ printf("\nThe block is in the disk");
return;
}
if(MA[0]<3) /*当前组不满3块*/
{ i=MA[0];
MA[i+1]=j;
MA[0]++;
}
else /*已有3块*/
{ for(i=0;i<=3;i++)
A[j][i]=MA[i];
MA[0]=1;
MA[1]=j;
}
display(); /*显示*/
}
int filecontrol();
void menu() /*功能选择函数*/
上一篇:四川移动公司协同办公视频会议系统
下一篇:单人简易呼吸囊操作流程