Add memorySize() method to StartupInformation

This commit is contained in:
Eryn Wells 2016-04-09 15:23:01 -04:00
parent 4ad6ce98fc
commit 9ce71e5596
2 changed files with 11 additions and 0 deletions

View file

@ -21,4 +21,12 @@ StartupInformation::kernelSize()
return kernelEnd - kernelStart;
}
u32
StartupInformation::memorySize()
const
{
// Memory is 1 MiB plus however much upper memory we have.
return 1024 * 1024 + multibootInformation->upperMemoryKB() * 1024;
}
} /* namespace kernel */

View file

@ -38,6 +38,9 @@ struct StartupInformation
/** Size of the kernel image in bytes. */
u32 kernelSize() const;
/** Size of memory in bytes. */
u32 memorySize() const;
};
} /* namespace kernel */