Lines Matching full:allocator
14 use crate::alloc::{Allocator, Global, Layout};
43 /// * Uses the excess returned from the allocator to use the largest available capacity.
53 pub(crate) struct RawVec<T, A: Allocator = Global> {
106 impl<T, A: Allocator> RawVec<T, A> {
120 /// Like `new`, but parameterized over the choice of allocator for
128 /// allocator for the returned `RawVec`.
136 /// allocator for the returned `RawVec`.
143 /// of allocator for the returned `RawVec`.
161 /// an allocator could overallocate and return a greater memory block than requested.
236 /// Reconstitutes a `RawVec` from a pointer, capacity, and allocator.
240 /// The `ptr` must be allocated (via the given allocator `alloc`), and with the given
267 /// Returns a shared reference to the allocator backing this `RawVec`.
268 pub fn allocator(&self) -> &A { in allocator() method
317 fn do_reserve_and_handle<T, A: Allocator>( in reserve()
356 /// exactly the amount of memory necessary, but in principle the allocator
400 impl<T, A: Allocator> RawVec<T, A> {
509 A: Allocator, in finish_grow()
519 // The allocator checks for alignment equality in finish_grow()
530 unsafe impl<#[may_dangle] T, A: Allocator> Drop for RawVec<T, A> {