From 8fb0a7c405337cda0fe539403e1dd477d2a7abed Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 9 Jan 2020 13:01:25 +0100 Subject: [PATCH] Update blog for #716 --- blog/content/second-edition/posts/10-heap-allocation/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blog/content/second-edition/posts/10-heap-allocation/index.md b/blog/content/second-edition/posts/10-heap-allocation/index.md index 85dcf28a..0bc6eae7 100644 --- a/blog/content/second-edition/posts/10-heap-allocation/index.md +++ b/blog/content/second-edition/posts/10-heap-allocation/index.md @@ -743,10 +743,12 @@ As a third test, we create ten thousand allocations after each other: ```rust // in tests/heap_allocation.rs +use blog_os::allocator::HEAP_SIZE; + #[test_case] fn many_boxes() { serial_print!("many_boxes... "); - for i in 0..10_000 { + for i in 0..HEAP_SIZE { let x = Box::new(i); assert_eq!(*x, i); }