Lines Matching defs:with_capacity
369 /// let mut v = KVec::with_capacity(10, GFP_KERNEL)?;
414 /// let mut v = KVec::with_capacity(5, GFP_KERNEL)?;
525 /// let v = KVec::<u32>::with_capacity(20, GFP_KERNEL)?;
530 pub fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError> {
552 let mut v = Self::with_capacity(n, flags | __GFP_ZERO)?;
555 // - `n <= capacity - len`: `with_capacity(n)` guarantees capacity >= n, len is 0.
809 /// let mut v = KVVec::with_capacity(elements_per_page * 4, GFP_KERNEL)?;
976 let mut v = Self::with_capacity(n, flags)?;
1549 let mut vec1: KVec<usize> = KVec::with_capacity(c.len(), GFP_KERNEL).unwrap();
1550 let mut vec2: KVec<usize> = KVec::with_capacity(c.len(), GFP_KERNEL).unwrap();
1577 let mut func = KVec::with_capacity(10, GFP_KERNEL).unwrap();
1592 let mut v = KVVec::<u8>::with_capacity(PAGE_SIZE * 4, GFP_KERNEL).unwrap();
1633 let mut v = KVVec::<u8>::with_capacity(PAGE_SIZE * 4, GFP_KERNEL).unwrap();
1650 let mut v = KVVec::<u8>::with_capacity(PAGE_SIZE, GFP_KERNEL).unwrap();
1668 let mut v = KVVec::<u8>::with_capacity(PAGE_SIZE * 4, GFP_KERNEL).unwrap();