mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
Kernel: Cache blocks_per_page in StorageDevice class
Instead of calculating blocks_per_page in every IO, cache it to save CPU cycles as that value will not change after initialization.
This commit is contained in:
parent
cf44d71edf
commit
3b27e28e67
2 changed files with 7 additions and 9 deletions
|
@ -66,7 +66,8 @@ private:
|
|||
|
||||
// FIXME: Remove this method after figuring out another scheme for naming.
|
||||
NonnullOwnPtr<KString> m_early_storage_device_name;
|
||||
u64 m_max_addressable_block;
|
||||
u64 m_max_addressable_block { 0 };
|
||||
size_t m_blocks_per_page { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue