Update blog for #716

This commit is contained in:
Philipp Oppermann
2020-01-09 13:01:25 +01:00
parent 192923bd2a
commit 8fb0a7c405

View File

@@ -743,10 +743,12 @@ As a third test, we create ten thousand allocations after each other:
```rust ```rust
// in tests/heap_allocation.rs // in tests/heap_allocation.rs
use blog_os::allocator::HEAP_SIZE;
#[test_case] #[test_case]
fn many_boxes() { fn many_boxes() {
serial_print!("many_boxes... "); serial_print!("many_boxes... ");
for i in 0..10_000 { for i in 0..HEAP_SIZE {
let x = Box::new(i); let x = Box::new(i);
assert_eq!(*x, i); assert_eq!(*x, i);
} }