Allocator Designs

This commit is contained in:
2022-01-13 16:31:49 +08:00
parent 5edf0795ed
commit 04f16dd1ce
6 changed files with 294 additions and 4 deletions

View File

@@ -54,6 +54,16 @@ fn many_boxes() {
}
}
#[test_case]
fn many_boxes_long_lived() {
let long_lived = Box::new(1);
for i in 0..HEAP_SIZE {
let x = Box::new(i);
assert_eq!(*x, i);
}
assert_eq!(*long_lived, 1);
}
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
anos::test_panic_handler(info)