Searched refs:new_capacity (Results 1 – 3 of 3) sorted by relevance
/system/nvram/messages/include/nvram/messages/ |
D | vector.h | 92 size_t new_capacity = capacity_; in Resize() local 94 new_capacity = size; in Resize() 96 new_capacity = capacity_ * 2 > size ? capacity_ * 2 : size; in Resize() 98 NVRAM_CHECK(new_capacity >= size); in Resize() 102 if (new_capacity != capacity_) { in Resize() 103 if (new_capacity == 0) { in Resize() 107 calloc(new_capacity, sizeof(ElementType))); in Resize() 138 capacity_ = new_capacity; in Resize()
|
/system/core/libutils/ |
D | VectorImpl.cpp | 334 ssize_t VectorImpl::setCapacity(size_t new_capacity) in setCapacity() argument 338 if (new_capacity <= size()) { in setCapacity() 343 LOG_ALWAYS_FATAL_IF(__builtin_mul_overflow(new_capacity, mItemSize, &new_allocation_size)); in setCapacity() 353 return new_capacity; in setCapacity() 397 size_t new_capacity = 0; in _grow() local 398 LOG_ALWAYS_FATAL_IF(__builtin_add_overflow(new_size, (new_size / 2), &new_capacity), in _grow() 401 __builtin_add_overflow(new_capacity, static_cast<size_t>(1u), &new_capacity), in _grow() 403 new_capacity = max(kMinVectorCapacity, new_capacity); in _grow() 406 LOG_ALWAYS_FATAL_IF(__builtin_mul_overflow(new_capacity, mItemSize, &new_alloc_size), in _grow() 471 const size_t new_capacity = max(kMinVectorCapacity, new_size * 2); in _shrink() local [all …]
|
/system/bt/osi/src/ |
D | array.cc | 97 const size_t new_capacity = array->capacity + (array->capacity / 2); in grow() local 101 new_capacity * array->element_size); in grow() 109 array->capacity = new_capacity; in grow()
|