progressing iteration
This commit is contained in:
parent
b77d425cc7
commit
d3a4931491
@ -159,12 +159,21 @@ void print_holes(node* umem_head) {
|
|||||||
kprint("Holes list is Empty");
|
kprint("Holes list is Empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
node *hole = NULL;
|
||||||
while(umem_head != NULL) {
|
while(umem_head != NULL) {
|
||||||
if (umem_head->base_register - 0x10000 != 0) {
|
if (umem_head->previous == NULL) {
|
||||||
node *hole = add_node( hole, 0x10000, umem_head->base_register-0x10000, true, -1);
|
if (umem_head->base_register != 0) {
|
||||||
print_list(hole, false);
|
hole = add_node( hole, 0x10000, umem_head->base_register-0x10000, true, 1);
|
||||||
umem_head = umem_head->next;
|
}
|
||||||
|
} else if (umem_head->next == NULL) {
|
||||||
|
node previous = umem_head->previous;
|
||||||
|
hole = add_node( hole, previous->base_register+previous->limit_register, -1, true, 1);
|
||||||
|
} else {
|
||||||
|
node previous = umem_head->previous;
|
||||||
|
node next = umem_head->next;
|
||||||
|
hole = add_node( hole, previous->base_register+previous->limit_register, next->base_register, true, 1);
|
||||||
}
|
}
|
||||||
|
umem_head = umem_head->next;
|
||||||
}
|
}
|
||||||
|
print_list(hole, false);
|
||||||
}
|
}
|
Reference in New Issue
Block a user