Refactor memory code.

Break out some more bootstrap code into functions. Add the start of
some Doxygen doc comments to help organize my thoughts.
This commit is contained in:
Justin C. Miller
2018-04-21 16:49:39 -07:00
parent 9a45ea562b
commit 4a38a74b16
3 changed files with 115 additions and 95 deletions

View File

@@ -11,7 +11,7 @@ page_block::list_consolidate()
page_block *next = cur->next;
if (next && cur->flags == next->flags &&
cur->end() == next->physical_address)
cur->physical_end() == next->physical_address)
{
cur->count += next->count;
cur->next = next->next;
@@ -60,15 +60,3 @@ page_block::list_dump(const char *name)
cons->put_dec(count);
cons->puts("\n");
}
void
page_table_indices::dump()
{
console *cons = console::get();
cons->puts("{");
for (int i = 0; i < 4; ++i) {
if (i) cons->puts(", ");
cons->put_dec(index[i]);
}
cons->puts("}");
}