/external/v8/src/utils/ |
D | detachable-vector.h | 56 size_t new_capacity = std::max(kMinimumCapacity, 2 * capacity_); in push_back() local 57 Resize(new_capacity); in push_back() 80 size_t new_capacity = std::max(size_, kMinimumCapacity); in shrink_to_fit() local 81 if (new_capacity < capacity_ / 2) { in shrink_to_fit() 82 Resize(new_capacity); in shrink_to_fit() 89 void Resize(size_t new_capacity) { in Resize() argument 90 DCHECK_LE(size_, new_capacity); in Resize() 91 T* new_data_ = new T[new_capacity]; in Resize() 97 capacity_ = new_capacity; in Resize()
|
/external/v8/src/execution/ |
D | microtask-queue.cc | 104 intptr_t new_capacity = std::max(kMinimumCapacity, capacity_ << 1); in EnqueueMicrotask() local 105 ResizeBuffer(new_capacity); in EnqueueMicrotask() 209 intptr_t new_capacity = capacity_; in IterateMicrotasks() local 210 while (new_capacity > 2 * size_) { in IterateMicrotasks() 211 new_capacity >>= 1; in IterateMicrotasks() 213 new_capacity = std::max(new_capacity, kMinimumCapacity); in IterateMicrotasks() 214 if (new_capacity < capacity_) { in IterateMicrotasks() 215 ResizeBuffer(new_capacity); in IterateMicrotasks() 260 void MicrotaskQueue::ResizeBuffer(intptr_t new_capacity) { in ResizeBuffer() argument 261 DCHECK_LE(size_, new_capacity); in ResizeBuffer() [all …]
|
D | external-pointer-table.cc | 12 uint32_t new_capacity = table->capacity_ + table->capacity_ / 2; in GrowTable() local 14 realloc(table->buffer_, new_capacity * sizeof(Address))); in GrowTable() 17 (new_capacity - table->capacity_) * sizeof(Address)); in GrowTable() 18 table->capacity_ = new_capacity; in GrowTable()
|
/external/perfetto/include/perfetto/ext/base/ |
D | circular_queue.h | 252 void Grow(size_t new_capacity = 0) { 255 new_capacity = new_capacity ? new_capacity : capacity_ * 2; 256 PERFETTO_CHECK((new_capacity & (new_capacity - 1)) == 0); // Must be pow2. 260 PERFETTO_CHECK(new_capacity > capacity_); 261 size_t malloc_size = new_capacity * sizeof(T); 262 PERFETTO_CHECK(malloc_size > new_capacity); 278 capacity_ = new_capacity;
|
D | container_annotations.h | 45 new_capacity) \ argument 47 ANNOTATE_NEW_BUFFER(buffer, new_capacity, buffer_size); 54 new_capacity) argument
|
/external/v8/src/builtins/ |
D | growable-fixed-array-gen.cc | 76 const TNode<IntPtrT> new_capacity = in NewCapacity() local 80 return new_capacity; in NewCapacity() 84 const TNode<IntPtrT> element_count, const TNode<IntPtrT> new_capacity) { in ResizeFixedArray() argument 86 CSA_ASSERT(this, IntPtrGreaterThanOrEqual(new_capacity, IntPtrConstant(0))); in ResizeFixedArray() 87 CSA_ASSERT(this, IntPtrGreaterThanOrEqual(new_capacity, element_count)); in ResizeFixedArray() 96 base::Optional<TNode<IntPtrT>>(new_capacity), flags)); in ResizeFixedArray()
|
/external/mesa3d/src/util/ |
D | string_buffer.c | 34 uint32_t new_capacity = str->capacity * 2; in ensure_capacity() local 35 while (needed_capacity > new_capacity) in ensure_capacity() 36 new_capacity *= 2; in ensure_capacity() 38 str->buf = reralloc_array_size(str, str->buf, sizeof(char), new_capacity); in ensure_capacity() 42 str->capacity = new_capacity; in ensure_capacity()
|
/external/v8/src/heap/ |
D | new-spaces.cc | 156 bool SemiSpace::GrowTo(size_t new_capacity) { in GrowTo() argument 160 DCHECK_EQ(new_capacity & kPageAlignmentMask, 0u); in GrowTo() 161 DCHECK_LE(new_capacity, maximum_capacity_); in GrowTo() 162 DCHECK_GT(new_capacity, current_capacity_); in GrowTo() 163 const size_t delta = new_capacity - current_capacity_; in GrowTo() 184 current_capacity_ = new_capacity; in GrowTo() 199 bool SemiSpace::ShrinkTo(size_t new_capacity) { in ShrinkTo() argument 200 DCHECK_EQ(new_capacity & kPageAlignmentMask, 0u); in ShrinkTo() 201 DCHECK_GE(new_capacity, minimum_capacity_); in ShrinkTo() 202 DCHECK_LT(new_capacity, current_capacity_); in ShrinkTo() [all …]
|
/external/libchrome/base/task/sequence_manager/ |
D | lazily_deallocated_deque.h | 169 size_t new_capacity = max_size_ + 1; in MaybeShrinkQueue() local 170 if (new_capacity < kMinimumRingSize) in MaybeShrinkQueue() 171 new_capacity = kMinimumRingSize; in MaybeShrinkQueue() 179 if (new_capacity + kReclaimThreshold >= capacity()) in MaybeShrinkQueue() 182 SetCapacity(new_capacity); in MaybeShrinkQueue() 187 void SetCapacity(size_t new_capacity) { in SetCapacity() argument 188 std::unique_ptr<Ring> new_ring = std::make_unique<Ring>(new_capacity); in SetCapacity() 190 DCHECK_GE(new_capacity, size_ + 1); in SetCapacity()
|
/external/vixl/src/ |
D | code-buffer-vixl.cc | 172 void CodeBuffer::Grow(size_t new_capacity) { in Grow() argument 174 VIXL_ASSERT(new_capacity > capacity_); in Grow() 177 buffer_ = static_cast<byte*>(realloc(buffer_, new_capacity)); in Grow() 187 mremap(buffer_, capacity_, new_capacity, MREMAP_MAYMOVE)); in Grow() 195 capacity_ = new_capacity; in Grow()
|
/external/swiftshader/third_party/subzero/src/ |
D | IceAssembler.cpp | 117 intptr_t new_capacity = std::min(old_capacity * 2, old_capacity + OneMB); in extendCapacity() local 118 if (new_capacity < old_capacity) { in extendCapacity() 124 uintptr_t new_contents = NewContents(Assemblr, new_capacity); in extendCapacity() 134 Limit = computeLimit(new_contents, new_capacity); in extendCapacity() 137 assert(capacity() == new_capacity); in extendCapacity()
|
/external/v8/src/zone/ |
D | zone-list-inl.h | 57 int new_capacity = 1 + 2 * capacity_; in ResizeAddInternal() local 61 Resize(new_capacity, zone); in ResizeAddInternal() 66 void ZoneList<T>::Resize(int new_capacity, Zone* zone) { in Resize() argument 67 DCHECK_LE(length_, new_capacity); in Resize() 68 T* new_data = zone->NewArray<T>(new_capacity); in Resize() 78 capacity_ = new_capacity; in Resize()
|
/external/igt-gpu-tools/lib/ |
D | igt_stats.c | 71 unsigned int new_capacity; in get_new_capacity() local 74 new_capacity = (need >> 6) + (need < 9 ? 3 : 6); in get_new_capacity() 75 new_capacity += need; in get_new_capacity() 77 return new_capacity; in get_new_capacity() 84 unsigned int new_capacity; in igt_stats_ensure_capacity() local 89 new_capacity = get_new_capacity(new_n_values); in igt_stats_ensure_capacity() 91 sizeof(*stats->values_u64) * new_capacity); in igt_stats_ensure_capacity() 94 stats->capacity = new_capacity; in igt_stats_ensure_capacity()
|
/external/v8/src/objects/ |
D | ordered-hash-table.cc | 74 int new_capacity; in EnsureGrowable() local 77 new_capacity = kInitialCapacity; in EnsureGrowable() 82 new_capacity = capacity; in EnsureGrowable() 84 new_capacity = capacity << 1; in EnsureGrowable() 87 return Derived::Rehash(isolate, table, new_capacity); in EnsureGrowable() 247 Isolate* isolate, Handle<Derived> table, int new_capacity) { in Rehash() argument 251 Derived::Allocate(isolate, new_capacity, in Rehash() 299 int new_capacity) { in Rehash() argument 300 return Base::Rehash(isolate, table, new_capacity); in Rehash() 315 int new_capacity) { in Rehash() argument [all …]
|
D | layout-descriptor.cc | 78 int new_capacity = field_index + details.field_width_in_words(); in AppendIfFastOrUseFull() local 79 if (new_capacity > layout_descriptor.capacity()) { in AppendIfFastOrUseFull() 94 int new_capacity) { in EnsureCapacity() argument 96 if (new_capacity <= old_capacity) { in EnsureCapacity() 100 LayoutDescriptor::New(isolate, new_capacity); in EnsureCapacity()
|
D | string-table.cc | 65 int new_capacity = ComputeStringTableCapacity(at_least_room_for); in ComputeStringTableCapacityWithShrink() local 66 DCHECK_GE(new_capacity, at_least_room_for); in ComputeStringTableCapacityWithShrink() 68 if (new_capacity < kStringTableMinCapacity) return current_capacity; in ComputeStringTableCapacityWithShrink() 69 return new_capacity; in ComputeStringTableCapacityWithShrink() 560 int new_capacity = -1; in EnsureCapacity() local 564 new_capacity = capacity_after_shrinking; in EnsureCapacity() 568 new_capacity = ComputeStringTableCapacity(current_nof + 1); in EnsureCapacity() 571 if (new_capacity != -1) { in EnsureCapacity() 573 Data::Resize(isolate, std::unique_ptr<Data>(data), new_capacity); in EnsureCapacity()
|
D | ordered-hash-table.h | 212 int new_capacity); 283 int new_capacity); 324 int new_capacity); 498 int new_capacity); 662 int new_capacity); 696 int new_capacity); 781 Isolate* isolate, Handle<OrderedNameDictionary> table, int new_capacity); 873 int new_capacity);
|
/external/XNNPACK/src/ |
D | subgraph.c | 68 const size_t new_capacity = max(min(capacity * 2, capacity + 512), capacity + 64); in xnn_subgraph_new_internal_value() local 69 assert(new_capacity >= size + 1); in xnn_subgraph_new_internal_value() 70 values = xnn_reallocate_memory(values, new_capacity * sizeof(struct xnn_value)); in xnn_subgraph_new_internal_value() 77 memset(values + size, 0, (new_capacity - size) * sizeof(struct xnn_value)); in xnn_subgraph_new_internal_value() 78 subgraph->num_reserved_values = new_capacity; in xnn_subgraph_new_internal_value() 94 const size_t new_capacity = max(min(capacity * 2, capacity + 512), capacity + 64); in xnn_subgraph_new_node() local 95 assert(new_capacity >= size + 1); in xnn_subgraph_new_node() 96 nodes = xnn_reallocate_memory(nodes, new_capacity * sizeof(struct xnn_node)); in xnn_subgraph_new_node() 103 memset(nodes + size, 0, (new_capacity - size) * sizeof(struct xnn_node)); in xnn_subgraph_new_node() 104 subgraph->num_reserved_nodes = new_capacity; in xnn_subgraph_new_node()
|
/external/libchrome/base/ |
D | pickle.cc | 336 void Pickle::Resize(size_t new_capacity) { in Resize() argument 338 capacity_after_header_ = bits::Align(new_capacity, kPayloadUnit); in Resize() 413 size_t new_capacity = capacity_after_header_ * 2; in ClaimUninitializedBytesInternal() local 415 if (new_capacity > kPickleHeapAlign) in ClaimUninitializedBytesInternal() 416 new_capacity = bits::Align(new_capacity, kPickleHeapAlign) - kPayloadUnit; in ClaimUninitializedBytesInternal() 417 Resize(std::max(new_capacity, new_size)); in ClaimUninitializedBytesInternal()
|
/external/mesa3d/src/freedreno/vulkan/ |
D | tu_cs.c | 98 uint32_t new_capacity = MAX2(4, 2 * cs->bo_capacity); in tu_cs_add_bo() local 100 realloc(cs->bos, new_capacity * sizeof(struct tu_bo *)); in tu_cs_add_bo() 104 cs->bo_capacity = new_capacity; in tu_cs_add_bo() 145 uint32_t new_capacity = MAX2(4, cs->entry_capacity * 2); in tu_cs_reserve_entry() local 147 realloc(cs->entries, new_capacity * sizeof(struct tu_cs_entry)); in tu_cs_reserve_entry() 151 cs->entry_capacity = new_capacity; in tu_cs_reserve_entry()
|
/external/flac/libFLAC/ |
D | bitwriter.c | 104 unsigned new_capacity; in bitwriter_grow_() local 111 …new_capacity = bw->words + ((bw->bits + bits_to_add + FLAC__BITS_PER_WORD - 1) / FLAC__BITS_PER_WO… in bitwriter_grow_() 116 if(bw->capacity >= new_capacity) in bitwriter_grow_() 120 if((new_capacity - bw->capacity) % FLAC__BITWRITER_DEFAULT_INCREMENT) in bitwriter_grow_() 121 …new_capacity += FLAC__BITWRITER_DEFAULT_INCREMENT - ((new_capacity - bw->capacity) % FLAC__BITWRIT… in bitwriter_grow_() 123 FLAC__ASSERT(0 == (new_capacity - bw->capacity) % FLAC__BITWRITER_DEFAULT_INCREMENT); in bitwriter_grow_() 124 FLAC__ASSERT(new_capacity > bw->capacity); in bitwriter_grow_() 125 …FLAC__ASSERT(new_capacity >= bw->words + ((bw->bits + bits_to_add + FLAC__BITS_PER_WORD - 1) / FLA… in bitwriter_grow_() 127 new_buffer = safe_realloc_mul_2op_(bw->buffer, sizeof(bwword), /*times*/new_capacity); in bitwriter_grow_() 131 bw->capacity = new_capacity; in bitwriter_grow_()
|
/external/perfetto/src/protozero/ |
D | proto_decoder.cc | 227 uint32_t new_capacity = capacity_ * 2; in ExpandHeapStorage() local 228 PERFETTO_CHECK(new_capacity > size_); in ExpandHeapStorage() 229 std::unique_ptr<Field[]> new_storage(new Field[new_capacity]); in ExpandHeapStorage() 237 capacity_ = new_capacity; in ExpandHeapStorage()
|
/external/protobuf/src/google/protobuf/stubs/ |
D | bytestream.cc | 124 size_t new_capacity = std::max(capacity_ + amount, (3 * capacity_) / 2); in Expand() local 125 char* bigger = new char[new_capacity]; in Expand() 129 capacity_ = new_capacity; in Expand()
|
/external/libchrome/base/containers/ |
D | circular_deque.h | 585 void reserve(size_type new_capacity) { in reserve() argument 586 if (new_capacity > capacity()) in reserve() 587 SetCapacityTo(new_capacity); in reserve() 940 void SetCapacityTo(size_t new_capacity) { in SetCapacityTo() argument 943 VectorBuffer new_buffer(new_capacity + 1); in SetCapacityTo() 958 size_t new_capacity = in ExpandCapacityIfNecessary() local 960 SetCapacityTo(new_capacity); in ExpandCapacityIfNecessary() 976 size_t new_capacity = in ShrinkCapacityIfNecessary() local 978 if (new_capacity < capacity()) { in ShrinkCapacityIfNecessary() 980 SetCapacityTo(new_capacity); in ShrinkCapacityIfNecessary()
|
/external/v8/src/base/ |
D | small-vector.h | 152 size_t new_capacity = in Grow() local 154 T* new_storage = reinterpret_cast<T*>(malloc(sizeof(T) * new_capacity)); in Grow() 159 end_of_storage_ = new_storage + new_capacity; in Grow()
|