/commonlibrary/rust/ylong_runtime/ylong_runtime/src/io/buffered/ |
H A D | async_buf_writer.rs | 39 /// Creates a new `AsyncBufWriter<W>` with a default buffer capacity. 40 /// The default buffer capacity is 8 KB, which is the same as 59 /// Creates a new `AsyncBufWriter<W>` with a specific buffer capacity. 162 /// // Checks the capacity of the inner buffer 163 /// let capacity = buf_writer.capacity(); 165 /// let without_flush = capacity - buf_writer.buffer().len(); 169 pub fn capacity(&self) -> usize { in capacity() functions 170 self.buf.capacity() in capacity() 211 if self.buf.len() + buf.len() > self.buf.capacity() { in poll_write() [all...] |
H A D | async_buf_reader.rs | 41 /// Creates a new `AsyncBufReader<R>` with a default buffer capacity. 42 /// The default buffer capacity is 8 KB, which is the same as 61 /// Creates a new `AsyncBufReader<R>` with a specific buffer capacity. 74 pub fn with_capacity(capacity: usize, inner: R) -> AsyncBufReader<R> { in with_capacity() 77 buf: vec![0; capacity].into_boxed_slice(), in with_capacity() 145 /// Returns the capacity of the internal buffer. 156 /// let capacity = reader.capacity(); 157 /// assert_eq!(capacity, 10); 161 pub fn capacity( functions [all...] |
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/bounded/ |
H A D | array.rs | 42 capacity: usize, 58 pub(crate) fn new(capacity: usize) -> Array<T> { 59 assert!(capacity > 0, "Capacity cannot be zero."); 60 let data = (0..capacity) 69 capacity, 82 let index = (tail >> INDEX_SHIFT) % self.capacity; in prepare_send() 83 // index is bounded by capacity, unwrap is safe in prepare_send() 106 // index is bounded by capacity, unwrap is safe 144 let index = head % self.capacity; 145 // index is bounded by capacity, unwra [all...] |
H A D | mod.rs | 95 /// The channel is bounded with the passed in capacity. 99 /// Panics if the new capacity is initialized to zero. 264 /// Gets the capacity of the channel. 271 /// assert_eq!(tx.capacity(), 5); 273 pub fn capacity(&self) -> usize { in capacity() functions 274 self.channel.capacity() in capacity()
|
/commonlibrary/c_utils/base/include/ |
H A D | safe_block_queue.h | 44 explicit SafeBlockQueue(int capacity) : maxSize_(capacity) in SafeBlockQueue() argument 177 explicit SafeBlockQueueTracking(int capacity) : SafeBlockQueue<T>(capacity) in SafeBlockQueueTracking() argument
|
H A D | sorted_vector.h | 82 * @brief Obtains the capacity of this vector, that is, the number of items 85 inline size_t Capacity() const { return vec_.capacity(); } in Capacity() 88 * @brief Sets the capacity of this vector. 90 * @param size Indicates the capacity to set. 92 * @return Returns the capacity if the operation is successful; 97 if (size < vec_.capacity()) { in SetCapcity()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/process/pty_process/ |
H A D | sys.rs | 75 name_buf.resize(name_buf.capacity(), 0); 78 // If the vec's capacity is too small, double it. 81 name_buf.resize(name_buf.capacity(), 0)
|
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/ |
H A D | kqueue.rs | 66 events.capacity() as c_int, in select() 223 /// Initializes a vector of events with an initial capacity 224 pub fn with_capacity(capacity: usize) -> Self { in with_capacity() 225 Events(Vec::with_capacity(capacity)) in with_capacity()
|
H A D | epoll.rs | 64 events.capacity() as i32, in select()
|
/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/ |
H A D | decoder.rs | 114 (offset, EncoderInstruction::SetCap { capacity }) => { 116 if capacity > self.max_table_capacity { 119 updater.update_capacity(capacity)?; 353 if self.table.capacity() > 0 { in stream_cancel() 380 fn update_capacity(&mut self, capacity: usize) -> Result<(), QpackError> { in update_capacity() 381 self.table.update_size(capacity); in update_capacity()
|
H A D | mod.rs | 207 capacity: usize,
|
H A D | table.rs | 119 capacity: usize, 130 capacity: 0, in with_empty() 139 if new_cap < self.capacity { 140 let required = self.capacity - new_cap; 143 self.capacity = new_cap; 147 self.capacity = new_cap; 184 pub(crate) fn capacity(&self) -> usize { 185 self.capacity 189 if required > self.capacity { 192 let bound = self.capacity [all...] |
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/util/ |
H A D | slab.rs | 271 if slots.used > 0 || slots.slots.capacity() == 0 { in compact() 746 let capacity = 3001; in ut_slab_multi_allocate() 747 let free_queue = Arc::new(Mutex::new(Vec::with_capacity(capacity))); in ut_slab_multi_allocate() 811 let capacity = 2001; in ut_slab_multi_allocate_drop() 812 let free_queue_one = Arc::new(Mutex::new(Vec::with_capacity(capacity))); in ut_slab_multi_allocate_drop() 815 let free_queue_two = Arc::new(Mutex::new(Vec::with_capacity(capacity))); in ut_slab_multi_allocate_drop()
|
H A D | slots.rs | 20 // Index tag of empty slot, vector will panic if the new capacity exceeds 217 /// Construct a new 'Slots' container with a capacity. 226 pub fn with_capacity(capacity: usize) -> Slots<T> { in with_capacity() 228 entries: Vec::with_capacity(capacity), in with_capacity() 281 self.entries.capacity(), in fmt()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/io/ |
H A D | read_buf.rs | 26 /// [ capacity ] 71 /// Returns the total buffer capacity. 73 pub fn capacity(&self) -> usize { in capacity() functions 147 /// Panics if n is bigger than the remaining capacity of the buf. 151 assert!(n <= remaining, "overflowed: try to initialize more bytes than the buffer's capacity, n: {}, remaining: {}", n, remaining); in initialize_unfilled_to() 213 /// initialized. If adding n bytes exceeds the capacity, the initialized 214 /// size will be set to the capacity. 217 let end = std::cmp::min(self.filled + n, self.capacity()); in assume_init() 277 assert_eq!(read_buf.capacity(), 16); in ut_test_readbuf_new() 329 assert_eq!(uninit_read_buf.capacity(), 1 in ut_test_readbuf_new() [all...] |
H A D | read_task.rs | 104 // Allocate spaces to read, if the remaining capacity is larger than 32 in poll_read_to_end() 110 from_raw_parts_mut(buf.as_mut_ptr().cast::<MaybeUninit<u8>>(), buf.capacity()) in poll_read_to_end()
|
/commonlibrary/c_utils/base/test/fuzztest/parcel_fuzzer/ |
H A D | parcel_fuzzer.cpp | 490 size_t capacity = dataProvider->ConsumeIntegralInRange<size_t>(1, MAX_BUFFER_SIZE); 491 parcel.SetDataCapacity(capacity);
|
/commonlibrary/rust/ylong_json/src/reader/ |
H A D | io_reader.rs | 309 assert_eq!(io_reader.buf.capacity(), 1024); in ut_io_reader_new()
|
/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/format/ |
H A D | decoder.rs | 232 DecResult::Decoded((buf_index, EncoderInstruction::SetCap { capacity: index })) in decode()
|