/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/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...] |
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...] |
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...] |
ustr_wcs.cpp | 108 int32_t newCapacity = 2 * srcLength; 109 if(newCapacity <= tempBufCapacity) { 110 newCapacity = _BUFFER_CAPACITY_MULTIPLIER * tempBufCapacity; 113 newCapacity, count, 1)) {
|
/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/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/chromium_org/third_party/WebKit/Source/core/xml/ |
XPathNodeSet.h | 46 void reserveCapacity(size_t newCapacity) { m_nodes.reserveCapacity(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;
|
/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/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/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);
|
/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;
|
phashtable.c | 278 unsigned int newCapacity = ((oldCapacity << 1) | 0x01); 284 sizeof(PHashTableEntry *) * newCapacity); 290 table->args.capacity = newCapacity; 291 table->threshold = (unsigned int)(newCapacity * table->args.maxLoadFactor); 293 for (i = oldCapacity; i < newCapacity; ++i) 302 idx = entry->hashCode % newCapacity;
|
/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;
|
/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/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/icu4c/i18n/ |
sortkey.cpp | 99 uint8_t *CollationKey::reallocate(int32_t newCapacity, int32_t length) { 100 uint8_t *newBytes = static_cast<uint8_t *>(uprv_malloc(newCapacity)); 107 fUnion.fFields.fCapacity = newCapacity;
|
/libcore/luni/src/main/java/libcore/io/ |
IoUtils.java | 240 final int newCapacity = capacity * 2; 241 byte[] newBytes = new byte[newCapacity]; 244 capacity = newCapacity;
|
/libcore/luni/src/main/java/java/util/ |
ArrayList.java | 154 Object[] newArray = new Object[newCapacity(s)]; 173 private static int newCapacity(int currentCapacity) { 197 int newCapacity = newCapacity(newSize - 1); // ~33% growth room 198 Object[] newArray = new Object[newCapacity]; 238 int newCapacity = newCapacity(newSize - 1); // ~33% growth room 239 Object[] newArray = new Object[newCapacity];
|
/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/icu4c/layoutex/ |
RunArrays.cpp | 55 void RunArray::grow(le_int32 newCapacity) 57 fLimits = (le_int32 *) LE_GROW_ARRAY(fLimits, newCapacity);
|