Add memorySize() method to StartupInformation
This commit is contained in:
parent
4ad6ce98fc
commit
9ce71e5596
2 changed files with 11 additions and 0 deletions
|
@ -21,4 +21,12 @@ StartupInformation::kernelSize()
|
||||||
return kernelEnd - kernelStart;
|
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 */
|
} /* namespace kernel */
|
||||||
|
|
|
@ -38,6 +38,9 @@ struct StartupInformation
|
||||||
|
|
||||||
/** Size of the kernel image in bytes. */
|
/** Size of the kernel image in bytes. */
|
||||||
u32 kernelSize() const;
|
u32 kernelSize() const;
|
||||||
|
|
||||||
|
/** Size of memory in bytes. */
|
||||||
|
u32 memorySize() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace kernel */
|
} /* namespace kernel */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue