add notes about alignment-altering reallocs to Allocator docs
This commit is contained in:
parent
0677edc86e
commit
e2466821ad
@ -173,6 +173,8 @@ pub unsafe trait Allocator {
|
||||
/// * `old_layout` must [*fit*] that block of memory (The `new_layout` argument need not fit it.).
|
||||
/// * `new_layout.size()` must be greater than or equal to `old_layout.size()`.
|
||||
///
|
||||
/// Note that `new_layout.align()` need not be the same as `old_layout.align()`.
|
||||
///
|
||||
/// [*currently allocated*]: #currently-allocated-memory
|
||||
/// [*fit*]: #memory-fitting
|
||||
///
|
||||
@ -234,6 +236,8 @@ pub unsafe trait Allocator {
|
||||
/// * `old_layout` must [*fit*] that block of memory (The `new_layout` argument need not fit it.).
|
||||
/// * `new_layout.size()` must be greater than or equal to `old_layout.size()`.
|
||||
///
|
||||
/// Note that `new_layout.align()` need not be the same as `old_layout.align()`.
|
||||
///
|
||||
/// [*currently allocated*]: #currently-allocated-memory
|
||||
/// [*fit*]: #memory-fitting
|
||||
///
|
||||
@ -296,6 +300,8 @@ pub unsafe trait Allocator {
|
||||
/// * `old_layout` must [*fit*] that block of memory (The `new_layout` argument need not fit it.).
|
||||
/// * `new_layout.size()` must be smaller than or equal to `old_layout.size()`.
|
||||
///
|
||||
/// Note that `new_layout.align()` need not be the same as `old_layout.align()`.
|
||||
///
|
||||
/// [*currently allocated*]: #currently-allocated-memory
|
||||
/// [*fit*]: #memory-fitting
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user