Uncomment and update empty mem page prints
This commit is contained in:
parent
2064d1a802
commit
831b49d8dd
1 changed files with 14 additions and 24 deletions
|
@ -73,30 +73,20 @@ void print_memory() {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (curr_page != NULL) {
|
while (curr_page != NULL) {
|
||||||
print("%d: [%x (%d)] [%x (%d)]\n",
|
print("%d: [%x (%d)] [%x (%d)]\n",
|
||||||
i,
|
i,
|
||||||
curr_page, sizeof(page_tag),
|
curr_page, sizeof(page_tag),
|
||||||
(curr_page + 1), curr_page->size);
|
(curr_page + 1), curr_page->size);
|
||||||
//
|
|
||||||
// void *empty_start = (void *) curr_page + sizeof(page_tag) + curr_page->size;
|
void *empty_start = (void *) curr_page + sizeof(page_tag) + curr_page->size;
|
||||||
// if (empty_start + sizeof(page_tag) < (void *) curr_page->next) {
|
if (empty_start + sizeof(page_tag) < (void *) curr_page->next) {
|
||||||
// terminal_writestring("_: empty_page (");
|
print("_: empty_page (%d, %d)\n",
|
||||||
// terminal_writeint(sizeof(page_tag), 10);
|
sizeof(page_tag),
|
||||||
// terminal_writestring(", ");
|
(void *) curr_page->next -
|
||||||
// terminal_writeint(
|
(empty_start + sizeof(page_tag)));
|
||||||
// (void *) curr_page->next -
|
} else if (empty_start < (void *) curr_page->next) {
|
||||||
// (empty_start + sizeof(page_tag)), 10);
|
print("_: not enough room (%d)\n",
|
||||||
// terminal_writestring(")\n");
|
(void *) curr_page->next - empty_start);
|
||||||
//// printf("empty_page (%ld, %ld)\n",
|
}
|
||||||
//// sizeof(page_tag),
|
|
||||||
//// (void *) curr_page->next -
|
|
||||||
//// (empty_start + sizeof(page_tag)));
|
|
||||||
// } else if (empty_start < (void *) curr_page->next) {
|
|
||||||
// terminal_writestring("_: not enough room (");
|
|
||||||
// terminal_writeint((void *) curr_page->next - empty_start, 10);
|
|
||||||
// terminal_writestring(")\n");
|
|
||||||
//// printf("not enough room (%ld)\n",
|
|
||||||
//// (void *) curr_page->next - empty_start);
|
|
||||||
// }
|
|
||||||
curr_page = curr_page->next;
|
curr_page = curr_page->next;
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue