Skip to content

Commit 113ca64

Browse files
simongdaviesludfjig
authored andcommitted
Add constant for the number of pages in a block to track dirty pages
Signed-off-by: Simon Davies <[email protected]>
1 parent ea320a2 commit 113ca64

File tree

1 file changed

+2
-0
lines changed
  • src/hyperlight_common/src

1 file changed

+2
-0
lines changed

src/hyperlight_common/src/mem.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
pub const PAGE_SHIFT: u64 = 12;
1818
pub const PAGE_SIZE: u64 = 1 << 12;
1919
pub const PAGE_SIZE_USIZE: usize = 1 << 12;
20+
// The number of pages in 1 "block". A single u64 can be used as bitmap to keep track of all dirty pages in a block.
21+
pub const PAGES_IN_BLOCK: usize = 64;
2022

2123
/// A memory region in the guest address space
2224
#[derive(Debug, Clone, Copy)]

0 commit comments

Comments
 (0)