Lines Matching defs:allocate
8930 panic!("Adding empty strings to a borrow should note allocate");
8933 panic!("Adding empty strings to a borrow should note allocate");
8936 panic!("Adding empty strings to a borrow should note allocate");
8939 panic!("Adding empty strings to a borrow should note allocate");
8956 panic!("Adding empty strings to a borrow should note allocate");
8959 panic!("Adding empty strings to a borrow should note allocate");
8962 panic!("Adding empty strings to a borrow should note allocate");
8980 panic!("Adding empty strings to a borrow should note allocate");
8986 panic!("Adding empty strings to a borrow should note allocate");
8992 panic!("Adding empty strings to a borrow should note allocate");
8998 panic!("Adding empty strings to a borrow should note allocate");
9020 panic!("Adding empty strings to a borrow should note allocate");
9026 panic!("Adding empty strings to a borrow should note allocate");
9032 panic!("Adding empty strings to a borrow should note allocate");
13853 allocator.allocate(Layout::from_size_align(size, align).unwrap()).unwrap()
14225 fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
14300 let new_ptr = self.allocate(new_layout)?;
14316 match Global.allocate(layout) {
14617 AllocInit::Uninitialized => alloc.allocate(layout),
14690 /// If `len` exceeds `self.capacity()`, this may fail to actually allocate
14769 /// If `len` exceeds `self.capacity()`, this may fail to actually allocate
14921 alloc.allocate(new_layout)
14947 // * We don't ever allocate `> isize::MAX` byte-size objects.
14948 // * We don't overflow `usize::MAX` and actually allocate too little.
14950 // On 64-bit we just need to check for overflow since trying to allocate
16389 /// re-allocate. For example, consider this program:
16415 /// [`with_capacity`] method to allocate the correct capacity initially:
16441 /// Here, there's no need to allocate more memory inside the loop.
16517 /// Given that the `String` is empty, this will not allocate any initial
19937 |layout| Global.allocate(layout),
20025 |layout| Global.allocate(layout),
20625 // Pre-allocate memory to allow writing the cloned value directly.
20695 allocate: impl FnOnce(Layout) -> Result<NonNull<[u8]>, AllocError>,
20704 Rc::try_allocate_for_layout(value_layout, allocate, mem_to_rcbox)
20718 allocate: impl FnOnce(Layout) -> Result<NonNull<[u8]>, AllocError>,
20728 let ptr = allocate(layout)?;
20748 |layout| Global.allocate(layout),
20783 |layout| Global.allocate(layout),
21367 /// This will allocate as many times as needed for constructing the `Vec<T>`
21368 /// and then it will allocate once for turning the `Vec<T>` into the `Rc<[T]>`.
21447 // to allocate space on the heap. That's not a value a real pointer
22203 /// sorting and it doesn't allocate auxiliary memory.
22254 /// sorting and it doesn't allocate auxiliary memory.
22297 /// sorting and it doesn't allocate auxiliary memory.
23546 // to allocate space on the heap. That's not a value a real pointer
23709 |layout| Global.allocate(layout),
23806 |layout| Global.allocate(layout),
24347 allocate: impl FnOnce(Layout) -> Result<NonNull<[u8]>, AllocError>,
24356 Arc::try_allocate_for_layout(value_layout, allocate, mem_to_arcinner)
24369 allocate: impl FnOnce(Layout) -> Result<NonNull<[u8]>, AllocError>,
24378 let ptr = allocate(layout)?;
24398 |layout| Global.allocate(layout),
24433 |layout| Global.allocate(layout),
24627 // Pre-allocate memory to allow writing the cloned value directly.
25708 /// This will allocate as many times as needed for constructing the `Vec<T>`
25709 /// and then it will allocate once for turning the `Vec<T>` into the `Arc<[T]>`.
30266 /// Does not allocate anything on its own.
32004 /// If the root node is the empty (non-allocated) root node, allocate our
32395 /// Does not allocate anything on its own.
42497 /// This method does not allocate and does not change the order of the
43241 /// This never needs to re-allocate, but does need to do *O*(*n*) data movement if
46815 //! Vectors ensure they never allocate more than `isize::MAX` bytes.
47081 /// on an empty Vec, it will not allocate memory. Similarly, if you store zero-sized
47082 /// types inside a `Vec`, it will not allocate space for them. *Note that in this case
47083 /// the `Vec` might not report a [`capacity`] of 0*. `Vec` will allocate if and only
47085 /// details are very subtle — if you intend to allocate memory using a `Vec`
47134 /// [`push`] and [`insert`] will never (re)allocate if the reported capacity is
47135 /// sufficient. [`push`] and [`insert`] *will* (re)allocate if
47194 /// The vector will not allocate until elements are pushed onto it.
47212 /// reallocating. If `capacity` is 0, the vector will not allocate.
47325 /// The vector will not allocate until elements are pushed onto it.
47347 /// reallocating. If `capacity` is 0, the vector will not allocate.
48441 // This will panic or abort if we would allocate > isize::MAX bytes
50034 // This is a zero-length vector which does not allocate if `lower_bound` was exact.
50176 //! never allocate more than `isize::MAX` bytes.
50219 //! elements are in the list, and so we don't know how much memory to allocate
50343 /// This doesn't actually allocate if `T` is zero-sized.
50418 /// This doesn't actually allocate if `T` is zero-sized.
50491 /// This doesn't actually allocate if `T` is zero-sized.
50515 /// This doesn't actually allocate if `T` is zero-sized.
50595 let ptr = alloc.allocate(layout)?.cast();
50674 /// This conversion does not allocate on the heap and happens in place.
50966 /// let ptr = System.allocate(Layout::new::<i32>())?.as_mut_ptr() as *mut i32;
51156 /// This conversion does not allocate on the heap and happens in place.
51218 // Pre-allocate memory to allow writing the cloned value directly.
51381 /// This conversion does not allocate on the heap and happens in place.
51456 /// This conversion does not allocate on the heap and happens in place.
51889 fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
51894 match Global.allocate(layout) {