-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vec
and Box
documentation do not state maximum allocation size guarantee
#68593
Comments
Along these lines, I want to point out that this a real system limit now, beyond just what Rust wants to do, at least if you're using the system allocator. This is mentioned in the glibc 2.30 release notes:
C and C++ |
Added upper bound of what vecs and boxes can allocate Fixed issue rust-lang#68593 I added a line of documentation to these two files to reflect that vectors and boxes ensure that they never allocate more than `isize::MAX` bytes. r? @steveklabnik
Added upper bound of what vecs and boxes can allocate Fixed issue rust-lang#68593 I added a line of documentation to these two files to reflect that vectors and boxes ensure that they never allocate more than `isize::MAX` bytes. r? @steveklabnik
Added upper bound of what vecs and boxes can allocate Fixed issue rust-lang#68593 I added a line of documentation to these two files to reflect that vectors and boxes ensure that they never allocate more than `isize::MAX` bytes. r? @steveklabnik
If that's the case, it might make sense to document that constraint on every allocation based API in the standard library, since it should apply to all of them. |
This has been fixed by #68711 and could be closed |
In the documentation for
pointer::add
, it is mentioned thathowever, this is not stated in documentation of
Vec
, the module documentation ofvec
, the documentation ofBox
or the module documentation ofboxed
.This can cause doubt, whether this statement actually holds true, since the places where one would expect such guarantees to be made (especially the "Guarantees" section of the
Vec
documentation) does not mention these guarantees.The text was updated successfully, but these errors were encountered: