From ec6b02ab95e476b08c44d67c0bbd99db0bb53fa1 Mon Sep 17 00:00:00 2001 From: travis-update-bot Date: Mon, 16 Nov 2015 14:18:36 +0000 Subject: [PATCH] Update blog to 25122bc05c5e93d0ed48166f6a1edbe84b0abe0d --- _posts/2015-11-15-allocating-frames.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_posts/2015-11-15-allocating-frames.md b/_posts/2015-11-15-allocating-frames.md index 2e7665f3..4f87db4a 100644 --- a/_posts/2015-11-15-allocating-frames.md +++ b/_posts/2015-11-15-allocating-frames.md @@ -306,7 +306,9 @@ fn choose_next_area(&mut self) { } } ``` -This function chooses the area with the minimal base address that still has free frames, i.e. `next_free_frame` is smaller than its last frame. Note that we need to clone the iterator because the order of areas in the memory map isn't specified. If there are no areas with free frames left, `min_by` automatically returns the desired `None`. +This function chooses the area with the minimal base address that still has free frames, i.e. `next_free_frame` is smaller than its last frame. Note that we need to clone the iterator because the [min_by] function consumes it. If there are no areas with free frames left, `min_by` automatically returns the desired `None`. + +[min_by]: https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by If the `next_free_frame` is below the new `current_area`, it needs to be updated to the area's start frame. Else, the `allocate_frame` call could return an unavailable frame.