-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
51 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
//! This module contains the [Page] type as well as associated page parameterization constants. | ||
/// An index of a [Page] within a [TrieMemory] structure. | ||
pub(crate) type PageIndex = u64; | ||
|
||
/// A page of memory, representing [PAGE_SIZE] bytes of data. | ||
pub(crate) type Page = [u8; PAGE_SIZE]; | ||
|
||
pub(crate) const PAGE_ADDRESS_SIZE: usize = 12; | ||
pub(crate) const PAGE_SIZE: usize = 1 << PAGE_ADDRESS_SIZE; | ||
pub(crate) const PAGE_ADDRESS_MASK: usize = PAGE_SIZE - 1; | ||
// pub(crate) const MAX_PAGE_COUNT: usize = 1 << PAGE_KEY_SIZE; | ||
// pub(crate) const PAGE_SIZE_WORDS: usize = PAGE_SIZE >> 5; | ||
// pub(crate) const PAGE_KEY_SIZE: usize = 64 - PAGE_ADDRESS_SIZE; | ||
// pub(crate) const PAGE_KEY_MASK: usize = MAX_PAGE_COUNT - 1; | ||
|
||
/// An empty page of memory, zeroed out. | ||
pub(crate) const EMPTY_PAGE: Page = [0u8; PAGE_SIZE]; | ||
|
||
/// An index of a [Page] within a [TrieMemory] structure. | ||
pub(crate) type PageIndex = u64; | ||
|
||
/// A page of memory, representing [PAGE_SIZE] bytes of data. | ||
pub(crate) type Page = [u8; PAGE_SIZE]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters