of(RECT));/*建立可利用区表的初始状态*/p=malloc(sizeof(RECT));head->size=MAX;head->address=0;head->next=p;maxblocknum=1;p->size=MAX;p->address=0;p->next=NULL;print(head);/*输出可利用表初始状态*/printf("Entertheway(bestorfirst(b/f)\n");/*选择适应策略*/scanf("%c",&way);do{printf("ept(as/ac)\n");scanf("%s",choose);/*选择分配或回收*/if(strcmp(choose,"as")==0)/*as为分配*/{printf("Inputapplication:\n");scanf("%d",&application1);/*输入申请空间大小*/assign1=assignment(head,application1);/*调用分配函数*/if(assign1->address==-1)/*分配不成功*/printf("Toolargeapplication!,assignfails!!\n\n");elseprintf("ess!!ADDRESS=%5d\n",assign1->address);/*分配成功*/print(head);/*输出*/}elseif(strcmp(choose,"ac")==0)/*回收*/back=malloc(sizeof(RECT));printf("InputAdressandSize!!\n");scanf("%d%d",&back->address,&back->size);/*输入回收地址和大小*/check=backcheck(head,back);/*检查*/if(check==1)