We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 60f356e + ac6023f commit a5136d6Copy full SHA for a5136d6
src/frame.rs
@@ -89,6 +89,8 @@ impl<const ORDER: usize> FrameAllocator<ORDER> {
89
90
/// Allocate a range of frames with the given size and alignment from the allocator, returning
91
/// 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.
94
pub fn alloc_aligned(&mut self, layout: Layout) -> Option<usize> {
95
let size = max(layout.size().next_power_of_two(), layout.align());
96
self.alloc_power_of_two(size)
0 commit comments