Skip to content

Commit bd378db

Browse files
committed
Increase max memory map size to 64 entries
1 parent 1dc2911 commit bd378db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bootinfo/memory_map.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ use core::ops::{Deref, DerefMut};
33

44
const PAGE_SIZE: u64 = 4096;
55

6+
const MAX_MEMORY_MAP_SIZE: usize = 64;
7+
68
#[repr(C)]
79
pub struct MemoryMap {
8-
entries: [MemoryRegion; 32],
10+
entries: [MemoryRegion; MAX_MEMORY_MAP_SIZE],
911
// u64 instead of usize so that the structure layout is platform
1012
// independent
1113
next_entry_index: u64,
@@ -14,7 +16,7 @@ pub struct MemoryMap {
1416
impl MemoryMap {
1517
pub fn new() -> Self {
1618
MemoryMap {
17-
entries: [MemoryRegion::empty(); 32],
19+
entries: [MemoryRegion::empty(); MAX_MEMORY_MAP_SIZE],
1820
next_entry_index: 0,
1921
}
2022
}

0 commit comments

Comments
 (0)