Home
last modified time | relevance | path

Searched refs:new_capacity (Results 1 – 3 of 3) sorted by relevance

/system/nvram/messages/include/nvram/messages/
Dvector.h92 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/
DVectorImpl.cpp336 ssize_t VectorImpl::setCapacity(size_t new_capacity) in setCapacity() argument
340 if (new_capacity <= size()) { in setCapacity()
345 LOG_ALWAYS_FATAL_IF(!safe_mul(&new_allocation_size, new_capacity, mItemSize)); in setCapacity()
355 return new_capacity; in setCapacity()
399 size_t new_capacity = 0; in _grow() local
400 LOG_ALWAYS_FATAL_IF(!safe_add(&new_capacity, new_size, (new_size / 2)), in _grow()
402 LOG_ALWAYS_FATAL_IF(!safe_add(&new_capacity, new_capacity, static_cast<size_t>(1u)), in _grow()
404 new_capacity = max(kMinVectorCapacity, new_capacity); in _grow()
407 LOG_ALWAYS_FATAL_IF(!safe_mul(&new_alloc_size, new_capacity, mItemSize), in _grow()
472 const size_t new_capacity = max(kMinVectorCapacity, new_size * 2); in _shrink() local
[all …]
/system/bt/osi/src/
Darray.cc97 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()