Lines Matching refs:new_capacity
336 ssize_t VectorImpl::setCapacity(size_t new_capacity)
340 if (new_capacity <= size()) {
345 LOG_ALWAYS_FATAL_IF(!safe_mul(&new_allocation_size, new_capacity, mItemSize));
355 return new_capacity;
399 size_t new_capacity = 0;
400 LOG_ALWAYS_FATAL_IF(!safe_add(&new_capacity, new_size, (new_size / 2)),
401 "new_capacity overflow");
402 LOG_ALWAYS_FATAL_IF(!safe_add(&new_capacity, new_capacity, static_cast<size_t>(1u)),
403 "new_capacity overflow");
404 new_capacity = max(kMinVectorCapacity, new_capacity);
407 LOG_ALWAYS_FATAL_IF(!safe_mul(&new_alloc_size, new_capacity, mItemSize),
410 // ALOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity);
472 const size_t new_capacity = max(kMinVectorCapacity, new_size * 2);
474 // NOTE: (new_capacity * mItemSize), (where * mItemSize) and
478 // where < (where + amount) < new_capacity < old_capacity.
484 SharedBuffer* sb = cur_sb->editResize(new_capacity * mItemSize);
491 SharedBuffer* sb = SharedBuffer::alloc(new_capacity * mItemSize);