Skip to content

Commit e11563e

Browse files
committed
Fixed the heap allocation tests
Signed-off-by: SlyMarbo <[email protected]>
1 parent 9595ae2 commit e11563e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/tests/heap_allocation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use bootloader::bootinfo::{FrameRange, MemoryRegion, MemoryRegionType};
1111
use bootloader::{entry_point, BootInfo};
1212
use core::panic::PanicInfo;
1313
use kernel::memory::pmm::BitmapFrameAllocator;
14-
use kernel::memory::{self, KERNEL_HEAP_SIZE};
14+
use kernel::memory::{self, KERNEL_HEAP};
1515
use kernel::Bitmap;
1616
use x86_64::structures::paging::{FrameAllocator, FrameDeallocator, PhysFrame};
1717
use x86_64::PhysAddr;
@@ -46,7 +46,7 @@ fn large_vec() {
4646

4747
#[test_case]
4848
fn many_boxes() {
49-
for i in 0..KERNEL_HEAP_SIZE {
49+
for i in 0..KERNEL_HEAP.size() {
5050
let x = Box::new(i);
5151
assert_eq!(*x, i);
5252
}

0 commit comments

Comments
 (0)