We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bf005a commit 93cf774Copy full SHA for 93cf774
src/lib.rs
@@ -39,7 +39,10 @@ pub use frame::*;
39
/// ```
40
/// use buddy_system_allocator::*;
41
/// # use core::mem::size_of;
42
-/// let mut heap = Heap::<32>::empty();
+/// // The order of the buddy system is `ORDER - 1`.
43
+/// // For example, to create a heap with a maximum block size of 2^32 bytes,
44
+/// // you should define the heap with `ORDER = 33`.
45
+/// let mut heap = Heap::<33>::empty();
46
/// # let space: [usize; 100] = [0; 100];
47
/// # let begin: usize = space.as_ptr() as usize;
48
/// # let end: usize = begin + 100 * size_of::<usize>();
0 commit comments