Skip to content

Commit a5136d6

Browse files
authored
Merge pull request #27 from aliciawyy/wipDoc
Improve clarity of alloc_aligned doc
2 parents 60f356e + ac6023f commit a5136d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/frame.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ impl<const ORDER: usize> FrameAllocator<ORDER> {
8989

9090
/// Allocate a range of frames with the given size and alignment from the allocator, returning
9191
/// the first frame of the allocated range.
92+
/// The allocated size is the maximum of the next power of two of the given size and the
93+
/// alignment.
9294
pub fn alloc_aligned(&mut self, layout: Layout) -> Option<usize> {
9395
let size = max(layout.size().next_power_of_two(), layout.align());
9496
self.alloc_power_of_two(size)

0 commit comments

Comments
 (0)