We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b75def commit 78f0dbbCopy full SHA for 78f0dbb
core/src/alloc/layout.rs
@@ -25,7 +25,9 @@ const fn size_align<T>() -> (usize, usize) {
25
/// An instance of `Layout` describes a particular layout of memory.
26
/// You build a `Layout` up as an input to give to an allocator.
27
///
28
-/// All layouts have an associated size and a power-of-two alignment.
+/// All layouts have an associated size and a power-of-two alignment. The size, when rounded up to
29
+/// the nearest multiple of `align`, does not overflow isize (i.e., the rounded value will always be
30
+/// less than or equal to `isize::MAX`).
31
32
/// (Note that layouts are *not* required to have non-zero size,
33
/// even though `GlobalAlloc` requires that all memory requests
0 commit comments