bestfit
struct memory{
char name[5];
int size,check,firstadd;
};
struct segment{
char name[5];
int size,check,base,bound;
};
void capphat(memory m[10], int n, segment s[10], int l){
int a=0;a
for(int j=0;j
a=k;
}
}
s[j].base=m[a].firstadd;
s[j].check=0;
m[i].check=0;
}
}
}
//~~
First fit
struct memory{
char name[5];
int size,check,firstadd;
};
struct segment{
char name[5];
int size,check,base,bound;
};
void capphat(memory m[10], int n, segment s[10], int l){
for(int j=0;j
{
sg[i].base=(*tg).firstadd;
(*tg).check=0;
sg[i].check=0;
}
}
}
//~~
Không có nhận xét nào:
Đăng nhận xét