Lines Matching defs:capacity
108 size_t VectorImpl::capacity() const
308 ALOG_ASSERT(index<capacity(),
309 "[%p] editItemLocation: index=%d, capacity=%d, count=%d",
310 this, (int)index, (int)capacity(), (int)mCount);
312 if (index < capacity()) {
323 ALOG_ASSERT(index<capacity(),
324 "[%p] itemLocation: index=%d, capacity=%d, count=%d",
325 this, (int)index, (int)capacity(), (int)mCount);
327 if (index < capacity()) {
338 // The capacity must always be greater than or equal to the size
341 return capacity();
381 // ALOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
382 // this, (int)where, (int)amount, (int)mCount, (int)capacity());
391 if (capacity() < new_size) {
395 // capacity without the +1. The old calculation wouldn't work properly
459 // ALOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
460 // this, (int)where, (int)amount, (int)mCount, (int)capacity());
469 if (new_size < (capacity() / 2)) {
470 // NOTE: (new_size * 2) is safe because capacity didn't overflow and
471 // new_size < (capacity / 2)).
476 // we are always reducing the capacity of the underlying SharedBuffer.