eturn;?}?elseif(pcbl->PCBelem[getTagByPcb(name)].valid=0)?{ printf("%c还没有运行请先运行\n",name);?}?printf("现在正回收%c的内存\n",name);?adress=pcbl->PCBelem[getTagByPcb(name)].address;?len=pcbl->PCBelem[getTagByPcb(name)].len;?while(i<partl->sum)?{ if(adress==partl->Partelem[i].address) { partl->Partelem[i].valid=0; } i++;?}}voidgetprint(){?inti;?printf("------空闲分区begin---------\n");?for(i=0;i<partl->sum;i++)?{ if(partl->Partelem[i].valid==0) { printf("第%d块空闲内存起止为%d,容量为%d\n",i,partl->Partelem[i].address,partl->Partelem[i].len); }?}?printf("------空闲分区end---------\n");}voidmain(){?chartem;?intOSsize=40;?constintM=25;?pcbl=(PCBseql*)malloc(sizeof(PCBseql));?partl=(Partseql*)malloc(sizeof(Partseql));?partl->sum=0;?pcbl->total=0;?init4IOS(OSsize);?//为进程分配内存?initpcb(pcbl,OSsize);?initpart();?scanf("%c",&tem);}