cin>>jobname;
cout<<所需内存块数:;
cin>>number;
if(number>total){
cout<<所需内存块数大于当前空闲块数请稍候再试:)< }
else{
p=initial_job();
strcpy(p->name,jobname);
p->next=jhead->next;
jhead->next=p;
p->quantity=number;
cout<<"所申请到的空闲块号流:";
for(i=0;i if(head->quantity>1){
cout<cell[head->quantity-1]<<" ";
head->quantity--;
p->cell[i]=head->cell[head->quantity-1];
}
else{
cout<cell[0]<<" ";
p->cell[i]=head->cell[head->quantity-1];
head->quantity--;
if(head->next!=NULL){
head=head->next;
}
}
total--;
}
}
[1] [2] [3] [4] [5] [6] [7] [8]