X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Fstd%2Fsrc%2Falloc.rs;h=61c1ff578b2cad4ec3f8c46b09bd71ab80ef0d1b;hb=3f377d3f9670b28abb8b52b3e69b8d76f2eb2c42;hp=a05e0db3af71663a3ff7596773e16940b90207dc;hpb=e3148dc7c48e1c96b05c85f57394308a6e46c1ed;p=rust.git diff --git a/library/std/src/alloc.rs b/library/std/src/alloc.rs index a05e0db3af7..61c1ff578b2 100644 --- a/library/std/src/alloc.rs +++ b/library/std/src/alloc.rs @@ -68,7 +68,10 @@ /// The default memory allocator provided by the operating system. /// /// This is based on `malloc` on Unix platforms and `HeapAlloc` on Windows, -/// plus related functions. +/// plus related functions. However, it is not valid to mix use of the backing +/// system allocator with `System`, as this implementation may include extra +/// work, such as to serve alignment requests greater than the alignment +/// provided directly by the backing system allocator. /// /// This type implements the `GlobalAlloc` trait and Rust programs by default /// work as if they had this definition: