This commit is contained in:
Yota Toyama
2023-09-28 12:23:39 +10:00
parent 54029abd34
commit c170e108ee
4 changed files with 4 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ fn main() {
unsafe { Allocator::register_current_thread().unwrap() }
for _ in 0..100 {
unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
let _ = unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
}
unsafe { Allocator::unregister_current_thread() }

View File

@@ -10,6 +10,6 @@ fn main() {
unsafe { Allocator::initialize() }
loop {
unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
let _ = unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
}
}

View File

@@ -13,7 +13,7 @@ fn main() {
unsafe { Allocator::register_current_thread().unwrap() }
loop {
unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
let _ = unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
}
});

View File

@@ -13,7 +13,7 @@ fn main() {
unsafe { Allocator::register_current_thread().unwrap() }
loop {
unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
let _ = unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
}
});