We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dc2911 commit bd378dbCopy full SHA for bd378db
src/bootinfo/memory_map.rs
@@ -3,9 +3,11 @@ use core::ops::{Deref, DerefMut};
3
4
const PAGE_SIZE: u64 = 4096;
5
6
+const MAX_MEMORY_MAP_SIZE: usize = 64;
7
+
8
#[repr(C)]
9
pub struct MemoryMap {
- entries: [MemoryRegion; 32],
10
+ entries: [MemoryRegion; MAX_MEMORY_MAP_SIZE],
11
// u64 instead of usize so that the structure layout is platform
12
// independent
13
next_entry_index: u64,
@@ -14,7 +16,7 @@ pub struct MemoryMap {
14
16
impl MemoryMap {
15
17
pub fn new() -> Self {
18
MemoryMap {
- entries: [MemoryRegion::empty(); 32],
19
+ entries: [MemoryRegion::empty(); MAX_MEMORY_MAP_SIZE],
20
next_entry_index: 0,
21
}
22
0 commit comments