/third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/ |
H A D | resize_uninitialized.h | 37 static void Resize(string_type* s, size_t new_size) { s->resize(new_size); } in Resize() 46 static void Resize(string_type* s, size_t new_size) { in Resize() 47 s->__resize_default_init(new_size); in Resize() 61 // Like str->resize(new_size), except any new characters added to "*str" as a 66 inline void STLStringResizeUninitialized(string_type* s, size_t new_size) { in STLStringResizeUninitialized() argument 67 ResizeUninitializedTraits<string_type>::Resize(s, new_size); in STLStringResizeUninitialized() 74 void STLStringReserveAmortized(string_type* s, size_t new_size) { in STLStringReserveAmortized() argument 76 if (new_size > cap) { in STLStringReserveAmortized() 78 s->reserve((std::max)(new_size, in STLStringReserveAmortized() 87 STLStringResizeUninitializedAmortized(string_type* s, size_t new_size) STLStringResizeUninitializedAmortized() argument [all...] |
/third_party/node/deps/v8/src/heap/cppgc/ |
H A D | explicit-management.cc | 80 bool Grow(HeapObjectHeader& header, BasePage& base_page, size_t new_size, in Grow() argument 82 DCHECK_GE(new_size, header.AllocatedSize() + kAllocationGranularity); in Grow() 93 header.SetAllocatedSize(new_size); in Grow() 99 bool Shrink(HeapObjectHeader& header, BasePage& base_page, size_t new_size, in Shrink() argument 101 DCHECK_GE(header.AllocatedSize(), new_size + kAllocationGranularity); in Shrink() 114 header.SetAllocatedSize(new_size); in Shrink() 122 header.SetAllocatedSize(new_size); in Shrink() 150 const size_t new_size = RoundUp<kAllocationGranularity>( in Resize() local 155 if (new_size > old_size) { in Resize() 156 return Grow(header, *base_page, new_size, new_siz in Resize() [all...] |
/third_party/python/Lib/ctypes/test/ |
H A D | test_varsize_struct.py | 17 new_size = sizeof(X) + sizeof(c_int) * 1 18 resize(x, new_size) 19 self.assertEqual(sizeof(x), new_size) 23 new_size = sizeof(X) + sizeof(c_int) * 9 24 resize(x, new_size) 25 self.assertEqual(sizeof(x), new_size) 29 new_size = sizeof(X) + sizeof(c_int) * 1 30 resize(x, new_size) 31 self.assertEqual(sizeof(x), new_size)
|
/third_party/ltp/testcases/kernel/syscalls/mremap/ |
H A D | mremap05.c | 35 * at the address range specified by new_address and new_size. 52 size_t new_size; /* in pages */ member 75 .new_size = 1, 84 .new_size = 1, 93 .new_size = 1, 102 .new_size = 1, 109 .new_size = 1, 138 t->ret = mremap(t->old_address, t->old_size, t->new_size, t->flags, in test_mremap() 163 t->new_address = get_test_area(t->new_size * pagesize, 1); in setup0() 169 t->new_address = get_test_area((t->new_size in setup1() [all...] |
/third_party/protobuf/src/google/protobuf/ |
H A D | repeated_field.cc | 51 int new_size = current_size_ + extend_amount; in InternalExtend() local 52 if (total_size_ >= new_size) { in InternalExtend() 54 // total_size must be non-zero since it is lower-bounded by new_size. in InternalExtend() 59 new_size = std::max(internal::kRepeatedFieldLowerClampLimit, in InternalExtend() 60 std::max(total_size_ * 2, new_size)); in InternalExtend() 61 GOOGLE_CHECK_LE(new_size, (std::numeric_limits<size_t>::max() - kRepHeaderSize) / in InternalExtend() 64 size_t bytes = kRepHeaderSize + sizeof(old_rep->elements[0]) * new_size; in InternalExtend() 73 total_size_ = new_size; in InternalExtend() 93 void RepeatedPtrFieldBase::Reserve(int new_size) { in Reserve() argument 94 if (new_size > current_size in Reserve() [all...] |
/third_party/skia/third_party/externals/freetype/src/lzw/ |
H A D | ftzopen.c | 126 FT_Offset new_size = old_size; in ft_lzwstate_stack_grow() local 128 new_size = new_size + ( new_size >> 1 ) + 4; in ft_lzwstate_stack_grow() 139 if ( new_size > ( 1 << LZW_MAX_BITS ) ) in ft_lzwstate_stack_grow() 141 new_size = 1 << LZW_MAX_BITS; in ft_lzwstate_stack_grow() 142 if ( new_size == old_size ) in ft_lzwstate_stack_grow() 146 if ( FT_QRENEW_ARRAY( state->stack, old_size, new_size ) ) in ft_lzwstate_stack_grow() 153 state->stack_size = new_size; in ft_lzwstate_stack_grow() 164 FT_UInt new_size in ft_lzwstate_prefix_grow() local [all...] |
/third_party/libfuse/example/ |
H A D | cuse.c | 63 static int cusexmp_resize(size_t new_size) in cusexmp_resize() argument 67 if (new_size == cusexmp_size) in cusexmp_resize() 70 new_buf = realloc(cusexmp_buf, new_size); in cusexmp_resize() 71 if (!new_buf && new_size) in cusexmp_resize() 74 if (new_size > cusexmp_size) in cusexmp_resize() 75 memset(new_buf + cusexmp_size, 0, new_size - cusexmp_size); in cusexmp_resize() 78 cusexmp_size = new_size; in cusexmp_resize() 83 static int cusexmp_expand(size_t new_size) in cusexmp_expand() argument 85 if (new_size > cusexmp_size) in cusexmp_expand() 86 return cusexmp_resize(new_size); in cusexmp_expand() [all...] |
H A D | ioctl.c | 48 static int fioc_resize(size_t new_size) in fioc_resize() argument 52 if (new_size == fioc_size) in fioc_resize() 55 new_buf = realloc(fioc_buf, new_size); in fioc_resize() 56 if (!new_buf && new_size) in fioc_resize() 59 if (new_size > fioc_size) in fioc_resize() 60 memset(new_buf + fioc_size, 0, new_size - fioc_size); in fioc_resize() 63 fioc_size = new_size; in fioc_resize() 68 static int fioc_expand(size_t new_size) in fioc_expand() argument 70 if (new_size > fioc_size) in fioc_expand() 71 return fioc_resize(new_size); in fioc_expand() [all...] |
H A D | cuse_client.c | 61 size_t *prev_size, size_t *new_size) in do_rw() 85 *new_size = arg.new_size; in do_rw() 96 size_t size, prev_size = 0, new_size = 0; in main() local 141 &prev_size, &new_size); in main() 145 rc, prev_size, new_size); in main() 60 do_rw(int fd, int is_read, size_t size, off_t offset, size_t *prev_size, size_t *new_size) do_rw() argument
|
/kernel/linux/linux-6.6/rust/alloc/ |
H A D | alloc.rs | 36 fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8; in __rust_realloc() 137 pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { in realloc() 138 unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) } in realloc() 207 // SAFETY: `new_size` is non-zero as `old_size` is greater than or equal to `new_size` in grow_impl() 210 let new_size = new_layout.size(); in grow_impl() 212 // `realloc` probably checks for `new_size >= old_layout.size()` or something similar. in grow_impl() 213 intrinsics::assume(new_size >= old_layout.size()); in grow_impl() 215 let raw_ptr = realloc(ptr.as_ptr(), old_layout, new_size); in grow_impl() 218 raw_ptr.add(old_size).write_bytes(0, new_size in grow_impl() [all...] |
/third_party/mesa3d/src/gallium/auxiliary/util/ |
H A D | u_bitmask.c | 94 unsigned new_size; in util_bitmask_resize() local 105 new_size = bm->size; in util_bitmask_resize() 106 while (new_size < minimum_size) { in util_bitmask_resize() 107 new_size *= 2; in util_bitmask_resize() 109 if (new_size < bm->size) in util_bitmask_resize() 112 assert(new_size); in util_bitmask_resize() 113 assert(new_size % UTIL_BITMASK_BITS_PER_WORD == 0); in util_bitmask_resize() 118 new_size / UTIL_BITMASK_BITS_PER_BYTE); in util_bitmask_resize() 124 (new_size - bm->size)/UTIL_BITMASK_BITS_PER_BYTE); in util_bitmask_resize() 126 bm->size = new_size; in util_bitmask_resize() [all...] |
H A D | u_handle_table.c | 103 unsigned new_size; in handle_table_resize() local 109 new_size = ht->size; in handle_table_resize() 110 while(!(new_size > minimum_size)) in handle_table_resize() 111 new_size *= 2; in handle_table_resize() 112 assert(new_size); in handle_table_resize() 116 new_size*sizeof(void *)); in handle_table_resize() 120 memset(new_objects + ht->size, 0, (new_size - ht->size)*sizeof(void *)); in handle_table_resize() 122 ht->size = new_size; in handle_table_resize()
|
/third_party/mesa3d/src/egl/main/ |
H A D | eglarray.c | 43 EGLint new_size; in _eglGrowArray() local 46 new_size = array->MaxSize; in _eglGrowArray() 47 while (new_size <= array->Size) in _eglGrowArray() 48 new_size *= 2; in _eglGrowArray() 50 elems = realloc(array->Elements, new_size * sizeof(array->Elements[0])); in _eglGrowArray() 53 array->Name, new_size); in _eglGrowArray() 58 array->MaxSize = new_size; in _eglGrowArray()
|
/third_party/skia/third_party/externals/libwebp/tests/fuzzer/ |
H A D | advanced_api_fuzzer.c | 95 size_t new_size = value + 1; in LLVMFuzzerTestOneInput() local 97 if (new_data + new_size > data + size) { in LLVMFuzzerTestOneInput() 98 new_size = data + size - new_data; in LLVMFuzzerTestOneInput() 100 status = WebPIAppend(idec, new_data, new_size); in LLVMFuzzerTestOneInput() 101 if (status != VP8_STATUS_SUSPENDED || new_size == 0) break; in LLVMFuzzerTestOneInput() 102 new_data += new_size; in LLVMFuzzerTestOneInput() 103 new_size *= 2; in LLVMFuzzerTestOneInput()
|
/kernel/linux/linux-5.10/fs/xfs/libxfs/ |
H A D | xfs_inode_fork.c | 356 size_t new_size; in xfs_iroot_realloc() local 374 new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, rec_diff); in xfs_iroot_realloc() 375 ifp->if_broot = kmem_alloc(new_size, KM_NOFS); in xfs_iroot_realloc() 376 ifp->if_broot_bytes = (int)new_size; in xfs_iroot_realloc() 388 new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, new_max); in xfs_iroot_realloc() 389 ifp->if_broot = krealloc(ifp->if_broot, new_size, in xfs_iroot_realloc() 394 (int)new_size); in xfs_iroot_realloc() 395 ifp->if_broot_bytes = (int)new_size; in xfs_iroot_realloc() 412 new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, new_max); in xfs_iroot_realloc() 414 new_size in xfs_iroot_realloc() 479 int64_t new_size = ifp->if_bytes + byte_diff; xfs_idata_realloc() local [all...] |
/kernel/linux/linux-6.6/fs/xfs/libxfs/ |
H A D | xfs_inode_fork.c | 381 size_t new_size; in xfs_iroot_realloc() local 399 new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, rec_diff); in xfs_iroot_realloc() 400 ifp->if_broot = kmem_alloc(new_size, KM_NOFS); in xfs_iroot_realloc() 401 ifp->if_broot_bytes = (int)new_size; in xfs_iroot_realloc() 413 new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, new_max); in xfs_iroot_realloc() 414 ifp->if_broot = krealloc(ifp->if_broot, new_size, in xfs_iroot_realloc() 419 (int)new_size); in xfs_iroot_realloc() 420 ifp->if_broot_bytes = (int)new_size; in xfs_iroot_realloc() 437 new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, new_max); in xfs_iroot_realloc() 439 new_size in xfs_iroot_realloc() 503 int64_t new_size = ifp->if_bytes + byte_diff; xfs_idata_realloc() local [all...] |
/third_party/node/deps/v8/src/base/ |
H A D | region-allocator.cc | 87 size_t new_size) { in Split() 88 DCHECK(IsAligned(new_size, page_size_)); in Split() 89 DCHECK_NE(new_size, 0); in Split() 90 DCHECK_GT(region->size(), new_size); in Split() 92 if (on_split_) on_split_(region->begin(), new_size); in Split() 98 new Region(region->begin() + new_size, region->size() - new_size, state); in Split() 103 region->set_size(new_size); in Split() 193 size_t new_size = requested_address - region->begin(); in AllocateRegionAt() local 194 DCHECK(IsAligned(new_size, page_size in AllocateRegionAt() 86 Split(Region* region, size_t new_size) Split() argument 262 TrimRegion(Address address, size_t new_size) TrimRegion() argument [all...] |
/third_party/node/deps/v8/src/zone/ |
H A D | zone.cc | 145 size_t new_size = kSegmentOverhead + new_size_no_overhead; in NewExpand() local 148 if (new_size_no_overhead < size || new_size < kSegmentOverhead) { in NewExpand() 151 if (new_size < kMinimumSegmentSize) { in NewExpand() 152 new_size = kMinimumSegmentSize; in NewExpand() 153 } else if (new_size >= kMaximumSegmentSize) { in NewExpand() 158 new_size = std::max({min_new_size, kMaximumSegmentSize}); in NewExpand() 160 if (new_size > INT_MAX) { in NewExpand() 164 allocator_->AllocateSegment(new_size, supports_compression()); in NewExpand() 169 DCHECK_GE(segment->total_size(), new_size); in NewExpand()
|
/kernel/linux/linux-5.10/drivers/staging/most/dim2/ |
H A D | dim2.c | 455 u16 new_size; in configure_channel() local 474 new_size = dim_norm_ctrl_async_buffer_size(buf_size); in configure_channel() 475 if (new_size == 0) { in configure_channel() 479 ccfg->buffer_size = new_size; in configure_channel() 480 if (new_size != buf_size) in configure_channel() 482 hdm_ch->name, buf_size, new_size); in configure_channel() 485 is_tx ? new_size * 2 : new_size); in configure_channel() 488 new_size = dim_norm_ctrl_async_buffer_size(buf_size); in configure_channel() 489 if (new_size in configure_channel() [all...] |
/kernel/linux/linux-6.6/drivers/staging/most/dim2/ |
H A D | dim2.c | 452 u16 new_size; in configure_channel() local 471 new_size = dim_norm_ctrl_async_buffer_size(buf_size); in configure_channel() 472 if (new_size == 0) { in configure_channel() 476 ccfg->buffer_size = new_size; in configure_channel() 477 if (new_size != buf_size) in configure_channel() 479 hdm_ch->name, buf_size, new_size); in configure_channel() 482 is_tx ? new_size * 2 : new_size); in configure_channel() 485 new_size = dim_norm_ctrl_async_buffer_size(buf_size); in configure_channel() 486 if (new_size in configure_channel() [all...] |
/kernel/linux/linux-5.10/fs/reiserfs/ |
H A D | objectid.c | 183 int new_size = (s->s_blocksize - SB_SIZE) / sizeof(__u32) / 2 * 2; in reiserfs_convert_objectid_map_v1() local 193 if (cur_size > new_size) { in reiserfs_convert_objectid_map_v1() 198 objectid_map[new_size - 1] = objectid_map[cur_size - 1]; in reiserfs_convert_objectid_map_v1() 199 set_sb_oid_cursize(disk_sb, new_size); in reiserfs_convert_objectid_map_v1() 202 for (i = new_size - 1; i >= 0; i--) { in reiserfs_convert_objectid_map_v1() 203 objectid_map[i + (old_max - new_size)] = objectid_map[i]; in reiserfs_convert_objectid_map_v1() 207 set_sb_oid_maxsize(disk_sb, new_size); in reiserfs_convert_objectid_map_v1()
|
/kernel/linux/linux-6.6/fs/reiserfs/ |
H A D | objectid.c | 183 int new_size = (s->s_blocksize - SB_SIZE) / sizeof(__u32) / 2 * 2; in reiserfs_convert_objectid_map_v1() local 193 if (cur_size > new_size) { in reiserfs_convert_objectid_map_v1() 198 objectid_map[new_size - 1] = objectid_map[cur_size - 1]; in reiserfs_convert_objectid_map_v1() 199 set_sb_oid_cursize(disk_sb, new_size); in reiserfs_convert_objectid_map_v1() 202 for (i = new_size - 1; i >= 0; i--) { in reiserfs_convert_objectid_map_v1() 203 objectid_map[i + (old_max - new_size)] = objectid_map[i]; in reiserfs_convert_objectid_map_v1() 207 set_sb_oid_maxsize(disk_sb, new_size); in reiserfs_convert_objectid_map_v1()
|
/third_party/skia/third_party/externals/sfntly/cpp/src/sample/subtly/ |
H A D | stats.cc | 54 int32_t new_size = 0; in PrintComparison() local 57 new_size = new_table->DataLength(); in PrintComparison() 61 if (new_size == size) { in PrintComparison() 64 fprintf(out, "-> %d (%lf%%) | %lf%% of original\n", new_size, in PrintComparison() 65 size_percent, static_cast<double>(new_size) / size * 100); in PrintComparison()
|
/third_party/mesa3d/src/gallium/drivers/radeonsi/ |
H A D | radeon_video.c | 90 struct rvid_buffer *new_buf, unsigned new_size) in si_vid_resize_buffer() 94 unsigned bytes = MIN2(new_buf->res->buf->size, new_size); in si_vid_resize_buffer() 98 if (!si_vid_create_buffer(screen, new_buf, new_size, new_buf->usage)) in si_vid_resize_buffer() 110 if (new_size > bytes) { in si_vid_resize_buffer() 111 new_size -= bytes; in si_vid_resize_buffer() 113 memset(dst, 0, new_size); in si_vid_resize_buffer() 89 si_vid_resize_buffer(struct pipe_screen *screen, struct radeon_cmdbuf *cs, struct rvid_buffer *new_buf, unsigned new_size) si_vid_resize_buffer() argument
|
/third_party/skia/third_party/externals/abseil-cpp/absl/container/internal/ |
H A D | inlined_vector.h | 399 void Initialize(ValueAdapter values, size_type new_size); 402 void Assign(ValueAdapter values, size_type new_size); 405 void Resize(ValueAdapter values, size_type new_size); 542 auto Storage<T, N, A>::Initialize(ValueAdapter values, size_type new_size) 549 if (new_size > GetInlinedCapacity()) { 553 size_type new_capacity = ComputeCapacity(GetInlinedCapacity(), new_size); 562 &values, new_size); variable 565 // already correct for either case, *adding* `new_size` gives us the correct 567 AddSize(new_size); variable 572 auto Storage<T, N, A>::Assign(ValueAdapter values, size_type new_size) 609 SetSize(new_size); global() variable 652 SetSize(new_size); global() variable 664 size_type new_size = storage_view.size + insert_count; global() variable 693 SetAllocatedSize(new_size); global() variable [all...] |