1 / 5
文档名称:

空闲磁盘存储空间的管理:位示图法(共5页).doc

格式:doc   大小:23KB   页数:5页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

空闲磁盘存储空间的管理:位示图法(共5页).doc

上传人:ogthpsa 2022/3/5 文件大小:23 KB

下载得到文件列表

空闲磁盘存储空间的管理:位示图法(共5页).doc

文档介绍

文档介绍:精选优质文档-----倾情为你奉上
精选优质文档-----倾情为你奉上
专心---专注---专业
专心---专注---专业
精选优质文档-----倾情为你奉上
专心---专注---专业
空闲磁盘存储的管理:位示图法
1:建立相py ; i ++ )
{
line = (now_location - i) / MAX_COLUMN ;
column = (now_location - i ) % MAX_COLUMN ;
//BIT[line][column] = 1 ;
byte[line] |= judge[column];
}
}
//清?零?
void clear(int now_location, int occupy)
{
int line ;
int column ;
for(int i = 0 ; i < occupy ; i ++)
{
line = (now_location + i) / MAX_COLUMN ;
column = (now_location + i ) % MAX_COLUMN ;
//BIT[line][column] = 0 ;
byte[line] &= judge2[column];
}
}
void bitset(int index ,int temp_block_quantity)
{
int block_quantity = temp_block_quantity ;
int free_quantity = 0 ;
int line, column ;
int sign = cycle - 1 ;
for (;; cycle++ )
{
line = cycle / MAX_COLUMN ;
column = cycle % MAX_COLUMN ;
if( 0 == byte_judge(byte[line],column))
{
free_quantity ++ ;
}
精选优质文档-----倾情为你奉上
精选优质文档-----倾情为你奉上
专心---专注---专业
专心---专注---专业
精选优质文档-----倾情为你奉上
专心---专注---专业
else
{
free_quantity = 0 ;
}
if(free_quantity >= block_quantity )
{
f[index].start = cycle - block_quantity + 1;
set(cycle, block_quantity);
cycle ++;
cout<<"create file success"<<endl;
show();
return ;
}
if(cycle >= MAX_LINE * MAX_COLUMN-1)
{
cycle = -1;
free_quantity = 0;
}
if(sign == cycle )
{
break ;
}