Home
last modified time | relevance | path

Searched refs:new_cap (Results 1 – 18 of 18) sorted by relevance

/third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/
Dresize_uninitialized_test.cc98 size_t new_cap = str.capacity(); in TEST() local
99 if (new_cap > prev_cap) ++cap_increase_count; in TEST()
100 prev_cap = new_cap; in TEST()
/third_party/musl/porting/linux/user/ldso/
Ddynlink_rand.c134 size_t new_cap = 0; in append_loadtasks() local
135 new_cap = tasks->capacity + TASK_BASE_CAPACITY; in append_loadtasks()
138 realloced = __libc_realloc(tasks->array, new_cap * sizeof(struct loadtask *)); in append_loadtasks()
144 tasks->capacity = new_cap; in append_loadtasks()
/third_party/rust/crates/cxx/src/symbols/
Drust_string.rs109 unsafe extern "C" fn string_reserve_total(this: &mut String, new_cap: usize) { in string_reserve_total()
110 if new_cap > this.capacity() { in string_reserve_total()
111 let additional = new_cap - this.len(); in string_reserve_total()
Drust_vec.rs49 unsafe extern "C" fn __reserve_total(this: *mut RustVec<$ty>, new_cap: usize) {
50 unsafe { &mut *this }.reserve_total(new_cap);
/third_party/libbpf/src/
Dhashmap.c105 size_t new_cap_bits, new_cap; in hashmap_grow() local
112 new_cap = 1UL << new_cap_bits; in hashmap_grow()
113 new_buckets = calloc(new_cap, sizeof(new_buckets[0])); in hashmap_grow()
122 map->cap = new_cap; in hashmap_grow()
Dbtf_dump.c380 size_t new_cap; in btf_dump_add_emit_queue_id() local
383 new_cap = max(16, d->emit_queue_cap * 3 / 2); in btf_dump_add_emit_queue_id()
384 new_queue = libbpf_reallocarray(d->emit_queue, new_cap, sizeof(new_queue[0])); in btf_dump_add_emit_queue_id()
388 d->emit_queue_cap = new_cap; in btf_dump_add_emit_queue_id()
1209 size_t new_cap; in btf_dump_push_decl_stack_id() local
1212 new_cap = max(16, d->decl_stack_cap * 3 / 2); in btf_dump_push_decl_stack_id()
1213 new_stack = libbpf_reallocarray(d->decl_stack, new_cap, sizeof(new_stack[0])); in btf_dump_push_decl_stack_id()
1217 d->decl_stack_cap = new_cap; in btf_dump_push_decl_stack_id()
/third_party/rust/crates/cxx/src/
Drust_vec.rs60 pub fn reserve_total(&mut self, new_cap: usize) { in reserve_total()
62 if new_cap > vec.capacity() { in reserve_total()
63 let additional = new_cap - vec.len(); in reserve_total()
Dcxx_string.rs28 fn string_reserve_total(this: Pin<&mut CxxString>, new_cap: usize); in string_reserve_total()
192 let new_cap = self in reserve() localVariable
196 unsafe { string_reserve_total(self, new_cap) } in reserve()
Dcxx.cc28 size_t new_cap) noexcept { in cxxbridge1$cxx_string$reserve_total() argument
29 s.reserve(new_cap); in cxxbridge1$cxx_string$reserve_total()
56 size_t new_cap) noexcept;
233 void String::reserve(std::size_t new_cap) noexcept { in reserve() argument
234 cxxbridge1$string$reserve_total(this, new_cap); in reserve()
651 rust::Vec<CXX_TYPE> *ptr, std::size_t new_cap) noexcept; \
679 void Vec<CXX_TYPE>::reserve_total(std::size_t new_cap) noexcept { \
680 cxxbridge1$rust_vec$##RUST_TYPE##$reserve_total(this, new_cap); \
/third_party/nghttp2/lib/
Dnghttp2_buf.c54 int nghttp2_buf_reserve(nghttp2_buf *buf, size_t new_cap, nghttp2_mem *mem) { in nghttp2_buf_reserve() argument
60 if (cap >= new_cap) { in nghttp2_buf_reserve()
64 new_cap = nghttp2_max(new_cap, cap * 2); in nghttp2_buf_reserve()
66 ptr = nghttp2_mem_realloc(mem, buf->begin, new_cap); in nghttp2_buf_reserve()
75 buf->end = ptr + new_cap; in nghttp2_buf_reserve()
Dnghttp2_buf.h108 int nghttp2_buf_reserve(nghttp2_buf *buf, size_t new_cap, nghttp2_mem *mem);
/third_party/node/deps/nghttp2/lib/
Dnghttp2_buf.c54 int nghttp2_buf_reserve(nghttp2_buf *buf, size_t new_cap, nghttp2_mem *mem) { in nghttp2_buf_reserve() argument
60 if (cap >= new_cap) { in nghttp2_buf_reserve()
64 new_cap = nghttp2_max(new_cap, cap * 2); in nghttp2_buf_reserve()
66 ptr = nghttp2_mem_realloc(mem, buf->begin, new_cap); in nghttp2_buf_reserve()
75 buf->end = ptr + new_cap; in nghttp2_buf_reserve()
Dnghttp2_buf.h108 int nghttp2_buf_reserve(nghttp2_buf *buf, size_t new_cap, nghttp2_mem *mem);
/third_party/rust/crates/cxx/include/
Dcxx.h70 void reserve(size_t new_cap) noexcept;
332 void reserve(std::size_t new_cap);
356 void reserve_total(std::size_t new_cap) noexcept;
934 void Vec<T>::reserve(std::size_t new_cap) {
935 this->reserve_total(new_cap);
/third_party/rust/crates/cxx/book/src/binding/
Dstring.md53 void reserve(size_t new_cap) noexcept;
Dvec.md45 void reserve(size_t new_cap);
/third_party/rust/crates/cxx/macro/src/
Dexpand.rs1364 …erve_total #impl_generics(this: *mut ::cxx::private::RustVec<#elem #ty_generics>, new_cap: usize) { in expand_rust_vec()
1366 (*this).reserve_total(new_cap); in expand_rust_vec()
/third_party/rust/crates/memchr/bench/data/code/
Drust-library.rs40990 let new_cap = used_cap localVariable
40995 if new_cap > old_cap {
40996 self.buf.reserve_exact(used_cap, new_cap - used_cap);
41081 let new_cap = used_cap localVariable
41086 if new_cap > old_cap {
41087 self.buf.try_reserve_exact(used_cap, new_cap - used_cap)?;