Skip to content

Commit e695004

Browse files
committed
Document maximum allocation size
1 parent f59e3c8 commit e695004

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

src/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ Language changes in Rust 1.80.0
2222
-------------------------------
2323

2424
* `Document maximum allocation size <https://github.com/rust-lang/rust/pull/116675/>`_
25+
26+
* New paragraphs: :p:`fls_CUJyMj0Sj8NS`, :p:`fls_kaomYy0Ml4Nh`, :p:`fls_B5cmkWfD5GNt`, :p:`fls_oqhQ62mDLckN`, :p:`fls_uhwpuv6cx4ip`, :p:`fls_xuuFKmm181bs`
27+
2528
* `Allow zero-byte offsets and ZST read/writes on arbitrary pointers <https://github.com/rust-lang/rust/pull/117329/>`_
2629
* `Support C23's variadics without a named parameter <https://github.com/rust-lang/rust/pull/124048/>`_
2730
* `Stabilize `exclusive_range_pattern` feature <https://github.com/rust-lang/rust/pull/124459/>`_

src/values.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ Values
1414
A :t:`value` is either a :t:`literal` or the result of a computation, that may
1515
be stored in a memory location, and interpreted based on some :t:`type`.
1616

17+
:dp:`fls_CUJyMj0Sj8NS`
18+
An :dt:`allocated object` is a :t:`value` stored at some memory address.
19+
20+
:dp:`fls_kaomYy0Ml4Nh`
21+
An :t:`[allocated object]s` :dt:`base address` is the the memory address the
22+
object is stored.
23+
24+
:dp:`fls_B5cmkWfD5GNt`
25+
An :t:`[allocated object]s` :dt:`memory size` is the number of bytes the object
26+
spans in memory from its :t:`base address`.
27+
1728
:dp:`fls_rixdyyc525xp`
1829
Two :t:`[value]s` :t:`overlap` when
1930

@@ -37,6 +48,20 @@ Two :t:`[value]s` :t:`overlap` when
3748
It is undefined behavior to create a :t:`value` from uninitialized memory unless
3849
the :t:`type` of the :t:`value` is a :t:`union type`.
3950

51+
:dp:`fls_oqhQ62mDLckN`
52+
It is undefined behavior to create an :t:`allocated object` at :t:`base address`
53+
:c:`null`.
54+
55+
:dp:`fls_uhwpuv6cx4ip`
56+
It is undefined behavior to create an :t:`allocated object` with :t:`memory
57+
size` ``size`` at a :t:`base address` ``base`` where ``base + size`` is greater
58+
than the architectures maximum :c:`usize` value.
59+
60+
:dp:`fls_xuuFKmm181bs`
61+
It is undefined behavior to create an :t:`allocated object` with :t:`memory
62+
size` ``size`` where ``size`` is greater than the architectures maximum
63+
:c:`isize` value.
64+
4065
.. _fls_ixjc5jaamx84:
4166

4267
Constants

0 commit comments

Comments
 (0)