/external/lzma/CPP/Common/ |
MyVector.cpp | 36 void CBaseRecordVector::Reserve(int newCapacity)
38 // if (newCapacity <= _capacity)
39 if (newCapacity == _capacity)
41 if ((unsigned)newCapacity >= ((unsigned)1 << (sizeof(unsigned) * 8 - 1)))
43 size_t newSize = (size_t)(unsigned)newCapacity * _itemSize;
44 if (newSize / _itemSize != (size_t)(unsigned)newCapacity)
52 int numRecordsToMove = (_size < newCapacity ? _size : newCapacity);
57 _capacity = newCapacity;
|
Buffer.h | 27 void SetCapacity(size_t newCapacity)
29 if (newCapacity == _capacity)
32 if (newCapacity > 0)
34 newBuffer = new T[newCapacity];
36 memmove(newBuffer, _items, MyMin(_capacity, newCapacity) * sizeof(T));
42 _capacity = newCapacity;
|
/external/chromium_org/third_party/icu/source/common/ |
cmemory.h | 133 * @param newCapacity must be >0 136 inline T *allocateInsteadAndReset(int32_t newCapacity=1); 142 * @param newCapacity must be >0 148 inline T *allocateInsteadAndCopy(int32_t newCapacity=1, int32_t length=0); 159 inline T *LocalMemory<T>::allocateInsteadAndReset(int32_t newCapacity) { 160 if(newCapacity>0) { 161 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); 163 uprv_memset(p, 0, newCapacity*sizeof(T)); 175 inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t length) { 176 if(newCapacity>0) [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
ResizableIntArray.java | 70 final int newCapacity = calculateCapacity(minimumCapacity); 71 if (newCapacity > 0) { 73 mArray = Arrays.copyOf(mArray, newCapacity); 103 final int newCapacity = calculateCapacity(ip.mLength); 104 if (newCapacity > 0) { 106 mArray = new int[newCapacity];
|
/external/clang/lib/Sema/ |
TypeLocBuilder.cpp | 45 void TypeLocBuilder::grow(size_t NewCapacity) { 46 assert(NewCapacity > Capacity); 49 char *NewBuffer = new char[NewCapacity]; 50 unsigned NewIndex = Index + NewCapacity - Capacity; 59 Capacity = NewCapacity; 76 size_t NewCapacity = Capacity * 2; 77 while (RequiredCapacity > NewCapacity) 78 NewCapacity *= 2; 79 grow(NewCapacity);
|
/external/icu4c/common/ |
cmemory.h | 180 * @param newCapacity must be >0 183 inline T *allocateInsteadAndReset(int32_t newCapacity=1); 189 * @param newCapacity must be >0 195 inline T *allocateInsteadAndCopy(int32_t newCapacity=1, int32_t length=0); 206 inline T *LocalMemory<T>::allocateInsteadAndReset(int32_t newCapacity) { 207 if(newCapacity>0) { 208 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); 210 uprv_memset(p, 0, newCapacity*sizeof(T)); 222 inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t length) { 223 if(newCapacity>0) [all...] |
ucharstriebuilder.cpp | 106 int32_t newCapacity; 108 newCapacity=1024; 110 newCapacity=4*elementsCapacity; 112 UCharsTrieElement *newElements=new UCharsTrieElement[newCapacity]; 122 elementsCapacity=newCapacity; 326 int32_t newCapacity=ucharsCapacity; 328 newCapacity*=2; 329 } while(newCapacity<=length); 330 UChar *newUChars=static_cast<UChar *>(uprv_malloc(newCapacity*2)); 338 u_memcpy(newUChars+(newCapacity-ucharsLength) [all...] |
bytestriebuilder.cpp | 156 int32_t newCapacity; 158 newCapacity=1024; 160 newCapacity=4*elementsCapacity; 162 BytesTrieElement *newElements=new BytesTrieElement[newCapacity]; 172 elementsCapacity=newCapacity; 378 int32_t newCapacity=bytesCapacity; 380 newCapacity*=2; 381 } while(newCapacity<=length); 382 char *newBytes=static_cast<char *>(uprv_malloc(newCapacity)); 390 uprv_memcpy(newBytes+(newCapacity-bytesLength) [all...] |
/external/qemu/android/utils/ |
intmap.c | 100 int newCapacity; 111 newCapacity = oldCapacity*2; 113 newCapacity = oldCapacity + (oldCapacity >> 2); 115 AARRAY_RENEW(keys, newCapacity); 116 AARRAY_RENEW(values, newCapacity); 120 map->capacity = newCapacity;
|
/external/srec/portable/src/ |
ArrayListImpl.c | 81 size_t newCapacity = impl->capacity * 2; 82 void** temp = REALLOC(impl->contents, newCapacity * sizeof(void*)); 86 impl->capacity = newCapacity; 126 size_t newCapacity = impl->capacity / 2; 129 if ((temp = REALLOC(impl->contents, newCapacity * sizeof(void*))) == NULL) 132 impl->capacity = newCapacity;
|
/external/chromium_org/third_party/icu/source/tools/toolutil/ |
toolutil.cpp | 265 int32_t newCapacity; 275 newCapacity=capacity; 277 newCapacity=2*mem->capacity; 279 newCapacity=mem->maxCapacity; 283 mem->array=uprv_malloc(newCapacity*mem->size); 288 mem->array=uprv_realloc(mem->array, newCapacity*mem->size); 295 mem->capacity=newCapacity;
|
/external/icu4c/tools/toolutil/ |
toolutil.cpp | 269 int32_t newCapacity; 279 newCapacity=capacity; 281 newCapacity=2*mem->capacity; 283 newCapacity=mem->maxCapacity; 287 mem->array=uprv_malloc(newCapacity*mem->size); 292 mem->array=uprv_realloc(mem->array, newCapacity*mem->size); 299 mem->capacity=newCapacity;
|
/external/chromium_org/third_party/WebKit/Source/wtf/text/ |
StringBuilder.cpp | 190 void StringBuilder::reserveCapacity(unsigned newCapacity) 194 if (newCapacity > m_buffer->length()) { 196 reallocateBuffer<LChar>(newCapacity); 198 reallocateBuffer<UChar>(newCapacity); 202 if (newCapacity > m_length) { 205 allocateBuffer(nullPlaceholder, newCapacity); 207 allocateBuffer(m_string.characters8(), newCapacity); 209 allocateBuffer(m_string.characters16(), newCapacity);
|
/frameworks/av/media/libstagefright/ |
SkipCutBuffer.cpp | 108 int32_t newcapacity = mCapacity + (num - available); local 109 char * newbuffer = new char[newcapacity]; 112 mCapacity = newcapacity; 114 ALOGV("reallocated buffer at size %d", newcapacity);
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
CompositeListAdapter.java | 77 int newCapacity = mSize + 2; 78 ListAdapter[] newAdapters = new ListAdapter[newCapacity]; 82 int[] newCounts = new int[newCapacity]; 86 int[] newViewTypeCounts = new int[newCapacity];
|
/external/clang/include/clang/Analysis/Support/ |
BumpVector.h | 218 size_t NewCapacity = 2*CurCapacity; 219 if (NewCapacity < MinSize) 220 NewCapacity = MinSize; 223 T *NewElts = C.getAllocator().template Allocate<T>(NewCapacity); 240 Capacity = Begin+NewCapacity;
|
/external/jmonkeyengine/engine/src/core/com/jme3/util/ |
IntMap.java | 142 int newCapacity = 2 * capacity; 143 Entry[] newTable = new Entry[newCapacity]; 145 int bucketmask = newCapacity - 1; 160 capacity = newCapacity; 161 threshold = (int) (newCapacity * loadFactor);
|
/external/chromium_org/third_party/WebKit/Source/wtf/ |
Vector.h | 258 void allocateBuffer(size_t newCapacity) 260 ASSERT(newCapacity); 261 RELEASE_ASSERT(newCapacity <= QuantizedAllocation::kMaxUnquantizedAllocation / sizeof(T)); 262 size_t sizeToAllocate = allocationSize(newCapacity); 401 void allocateBuffer(size_t newCapacity) 404 if (newCapacity > inlineCapacity) 405 Base::allocateBuffer(newCapacity); 550 void reserveCapacity(size_t newCapacity); 603 void shrinkCapacity(size_t newCapacity); 840 void Vector<T, inlineCapacity>::reserveCapacity(size_t newCapacity) [all...] |
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/misc/ |
IntArrayList.java | 89 public void ensureCapacity(int newCapacity) { 93 elements = new int[newCapacity];
|
/external/chromium_org/third_party/WebKit/Source/core/xml/ |
XPathNodeSet.h | 46 void reserveCapacity(size_t newCapacity) { m_nodes.reserveCapacity(newCapacity); }
|
/external/icu4c/layoutex/ |
RunArrays.cpp | 55 void RunArray::grow(le_int32 newCapacity) 57 fLimits = (le_int32 *) LE_GROW_ARRAY(fLimits, newCapacity);
|
/system/core/libutils/ |
BasicHashtable.cpp | 206 size_t newBucketCount, newCapacity; 207 determineCapacity(minimumCapacity, loadFactor, &newBucketCount, &newCapacity); 209 if (newBucketCount != mBucketCount || newCapacity != mCapacity) { 240 mCapacity = newCapacity;
|
/system/core/include/utils/ |
LruCache.h | 94 void rehash(size_t newCapacity); 223 void LruCache<TKey, TValue>::rehash(size_t newCapacity) { 229 mTable.reset(new BasicHashtable<TKey, Entry>(newCapacity));
|
/external/smack/src/org/jivesoftware/smack/util/collections/ |
AbstractHashedMap.java | 578 int newCapacity = data.length * 2; 579 if (newCapacity <= MAXIMUM_CAPACITY) { 580 ensureCapacity(newCapacity); 588 * @param newCapacity the new capacity of the array (a power of two, less or equal to max) 590 protected void ensureCapacity(int newCapacity) { 592 if (newCapacity <= oldCapacity) { 596 threshold = calculateThreshold(newCapacity, loadFactor); 597 data = new HashEntry[newCapacity]; 600 HashEntry<K, V> newEntries[] = new HashEntry[newCapacity]; 609 int index = hashIndex(entry.hashCode, newCapacity); [all...] |
/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ |
ExpandedNameTable.java | 250 int newCapacity = 2 * oldCapacity + 1; 251 m_capacity = newCapacity; 252 m_threshold = (int)(newCapacity * m_loadFactor); 254 m_table = new HashEntry[newCapacity]; 262 int newIndex = e.hash % newCapacity;
|