memory allocation
memory allocation
void main() {
int block[5] = {100, 500, 200, 300, 600};
int process[4] = {212, 417, 112, 426};
int i, j;
clrscr();
printf("First Fit Allocation:\n");
getch();
}
2. Best Fit – Simple Version
c
Copy
Edit
#include <stdio.h>
#include <conio.h>
void main() {
int block[5] = {100, 500, 200, 300, 600};
int process[4] = {212, 417, 112, 426};
int i, j, best;
clrscr();
printf("Best Fit Allocation:\n");
getch();
}
3. Worst Fit – Simple Version
c
Copy
Edit
#include <stdio.h>
#include <conio.h>
void main() {
int block[5] = {100, 500, 200, 300, 600};
int process[4] = {212, 417, 112, 426};
int i, j, worst;
clrscr();
printf("Worst Fit Allocation:\n");
getch();
}