Ver Fonte

Fix the docs

ticki há 9 anos atrás
pai
commit
3838443f52
1 ficheiros alterados com 40 adições e 30 exclusões
  1. 40 30
      src/block_list.rs

+ 40 - 30
src/block_list.rs

@@ -12,42 +12,50 @@
 //!
 //! We start with our initial segment.
 //!
-//!        Address space
-//!       I---------------------------------I
-//!     B
-//!     l
-//!     k
-//!     s
+//! ```notrust
+//!    Address space
+//!   I---------------------------------I
+//! B
+//! l
+//! k
+//! s
+//! ```
 //!
 //! We then split it at the aligner, which is used for making sure that the pointer is aligned properly.
 //!
-//!        Address space
-//!       I------I
-//!     B   ^    I--------------------------I
-//!     l  al
-//!     k
-//!     s
+//! ```notrust
+//!    Address space
+//!   I------I
+//! B   ^    I--------------------------I
+//! l  al
+//! k
+//! s
+//! ```
 //!
 //! We then use the remaining block, but leave the excessive space.
 //!
-//!        Address space
-//!       I------I
-//!     B                           I--------I
-//!     l        \_________________/
-//!     k        our allocated block.
-//!     s
+//! ```notrust
+//!    Address space
+//!   I------I
+//! B                           I--------I
+//! l        \_________________/
+//! k        our allocated block.
+//! s
+//! ```
 //!
 //! The pointer to the marked area is then returned.
 //!
 //! Deallocate
 //! ==========
 //!
-//!        Address space
-//!       I------I
-//!     B                                  I--------I
-//!     l        \_________________/
-//!     k     the used block we want to deallocate.
-//!     s
+//! ```notrust
+//!    Address space
+//!   I------I
+//! B                                  I--------I
+//! l        \_________________/
+//! k     the used block we want to deallocate.
+//! s
+//! ```
 //!
 //! We start by inserting the block, while keeping the list sorted. See `insertion` for details.
 //!
@@ -121,12 +129,14 @@
 //!
 //! We will first try to perform an in-place reallocation, and if that fails, we will use memmove.
 //!
-//!        Address space
-//!       I------I
-//!     B \~~~~~~~~~~~~~~~~~~~~~/
-//!     l     needed
-//!     k
-//!     s
+//! ```notrust
+//!    Address space
+//!   I------I
+//! B \~~~~~~~~~~~~~~~~~~~~~/
+//! l     needed
+//! k
+//! s
+//! ```
 //!
 //! We simply find the block next to our initial block. If this block is free and have sufficient
 //! size, we will simply merge it into our initial block. If these conditions are not met, we have