forked from xnkasy/Assignment123COL106Public
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA1DynamicMem.java
More file actions
33 lines (25 loc) · 738 Bytes
/
A1DynamicMem.java
File metadata and controls
33 lines (25 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Class: A1DynamicMem
// Implements DynamicMem
// Does not implement defragment (which is for A2).
public class A1DynamicMem extends DynamicMem {
public A1DynamicMem() {
super();
}
public A1DynamicMem(int size) {
super(size);
}
public A1DynamicMem(int size, int dict_type) {
super(size, dict_type);
}
public void Defragment() {
return ;
}
// In A1, you need to implement the Allocate and Free functions for the class A1DynamicMem
// Test your memory allocator thoroughly using Doubly Linked lists only (A1List.java).
public int Allocate(int blockSize) {
return -1;
}
public int Free(int startAddr) {
return -1;
}
}