fixed print list
This commit is contained in:
parent
e22cb17067
commit
935a8914f0
@ -161,18 +161,16 @@ void print_holes(node* umem_head) {
|
|||||||
}
|
}
|
||||||
u32 hole_ids = 0;
|
u32 hole_ids = 0;
|
||||||
node *hole = NULL;
|
node *hole = NULL;
|
||||||
|
if (umem_head->base_register-0x10000 != 0) {
|
||||||
|
hole = add_node( hole, 0x10000, umem_head->base_register-0x10000, true, ++hole_ids);
|
||||||
|
}
|
||||||
while(umem_head != NULL) {
|
while(umem_head != NULL) {
|
||||||
if (umem_head->previous == NULL) {
|
if (umem_head->next != NULL) {
|
||||||
if (umem_head->base_register-0x10000 != 0) {
|
node *next = umem_head->next;
|
||||||
hole = add_node( hole, 0x10000, umem_head->base_register-0x10000, true, ++hole_ids);
|
hole = add_node( hole, umem_head->base_register+umem_head->limit_register, next->base_register, true, ++hole_ids);
|
||||||
}
|
|
||||||
} else if (umem_head->next == NULL) {
|
|
||||||
node *previous = umem_head->previous;
|
|
||||||
hole = add_node( hole, previous->base_register+previous->limit_register, -1, true, ++hole_ids);
|
|
||||||
} else {
|
} else {
|
||||||
node *previous = umem_head->previous;
|
node *previous = umem_head->previous;
|
||||||
node *next = umem_head->next;
|
hole = add_node( hole, previous->base_register+previous->limit_register, -1, true, ++hole_ids);
|
||||||
hole = add_node( hole, previous->base_register+previous->limit_register, next->base_register, true, ++hole_ids);
|
|
||||||
}
|
}
|
||||||
umem_head = umem_head->next;
|
umem_head = umem_head->next;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user