Searched refs:newCapacity (Results 1 - 25 of 45) sorted by relevance

12

/external/lzma/CPP/Common/
H A DMyVector.cpp36 void CBaseRecordVector::Reserve(int newCapacity) argument
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;
H A DBuffer.h27 void SetCapacity(size_t newCapacity) argument
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/icu/icu4c/source/common/
H A Dcmemory.h181 * @param newCapacity must be >0
184 inline T *allocateInsteadAndReset(int32_t newCapacity=1);
190 * @param newCapacity must be >0
196 inline T *allocateInsteadAndCopy(int32_t newCapacity=1, int32_t length=0);
207 inline T *LocalMemory<T>::allocateInsteadAndReset(int32_t newCapacity) { argument
208 if(newCapacity>0) {
209 T *p=(T *)uprv_malloc(newCapacity*sizeof(T));
211 uprv_memset(p, 0, newCapacity*sizeof(T));
223 inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t length) { argument
224 if(newCapacity>
364 resize(int32_t newCapacity, int32_t length) argument
539 resize(int32_t newCapacity, int32_t length) argument
[all...]
H A Dbytestriebuilder.cpp156 int32_t newCapacity; local
158 newCapacity=1024;
160 newCapacity=4*elementsCapacity;
162 BytesTrieElement *newElements=new BytesTrieElement[newCapacity];
172 elementsCapacity=newCapacity;
378 int32_t newCapacity=bytesCapacity; local
380 newCapacity*=2;
381 } while(newCapacity<=length);
382 char *newBytes=static_cast<char *>(uprv_malloc(newCapacity));
390 uprv_memcpy(newBytes+(newCapacity
[all...]
H A Ducharstriebuilder.cpp106 int32_t newCapacity; local
108 newCapacity=1024;
110 newCapacity=4*elementsCapacity;
112 UCharsTrieElement *newElements=new UCharsTrieElement[newCapacity];
122 elementsCapacity=newCapacity;
326 int32_t newCapacity=ucharsCapacity; local
328 newCapacity*=2;
329 } while(newCapacity<=length);
330 UChar *newUChars=static_cast<UChar *>(uprv_malloc(newCapacity*2));
338 u_memcpy(newUChars+(newCapacity
[all...]
H A Dustr_wcs.cpp108 int32_t newCapacity = 2 * srcLength; local
109 if(newCapacity <= tempBufCapacity) {
110 newCapacity = _BUFFER_CAPACITY_MULTIPLIER * tempBufCapacity;
113 newCapacity, count, 1)) {
H A Dunistr.cpp1611 UnicodeString::cloneArrayIfNeeded(int32_t newCapacity, argument
1618 if(newCapacity == -1) {
1619 newCapacity = getCapacity();
1639 newCapacity > getCapacity()
1643 growCapacity = newCapacity;
1644 } else if(newCapacity <= US_STACKBUF_SIZE && growCapacity > US_STACKBUF_SIZE) {
1671 (newCapacity < growCapacity && allocate(newCapacity))
1677 newCapacity = getCapacity();
1678 if(newCapacity < minLengt
[all...]
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/impl/coll/
H A DUVector32.java38 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length;
39 int[] newBuffer = new int[newCapacity];
H A DUVector64.java38 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length;
39 long[] newBuffer = new long[newCapacity];
H A DCollationKeys.java239 int newCapacity = 2 * buffer.length;
241 if (newCapacity < altCapacity) {
242 newCapacity = altCapacity;
244 if (newCapacity < 200) {
245 newCapacity = 200;
247 byte[] newbuf = new byte[newCapacity];
/external/icu/icu4c/source/tools/toolutil/
H A Dtoolutil.cpp295 int32_t newCapacity; local
305 newCapacity=capacity;
307 newCapacity=2*mem->capacity;
309 newCapacity=mem->maxCapacity;
313 mem->array=uprv_malloc(newCapacity*mem->size);
318 mem->array=uprv_realloc(mem->array, newCapacity*mem->size);
325 mem->capacity=newCapacity;
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
H A DBytesTrieBuilder.java161 int newCapacity=bytes.length;
163 newCapacity*=2;
164 } while(newCapacity<=length);
165 byte[] newBytes=new byte[newCapacity];
H A DCharsTrieBuilder.java139 int newCapacity=chars.length;
141 newCapacity*=2;
142 } while(newCapacity<=length);
143 char[] newChars=new char[newCapacity];
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/misc/
H A DIntArrayList.java89 public void ensureCapacity(int newCapacity) { argument
93 elements = new int[newCapacity];
/external/guava/guava/src/com/google/common/collect/
H A DImmutableCollection.java223 int newCapacity = oldCapacity + (oldCapacity >> 1) + 1;
224 if (newCapacity < minCapacity) {
225 newCapacity = Integer.highestOneBit(minCapacity - 1) << 1;
227 if (newCapacity < 0) {
228 newCapacity = Integer.MAX_VALUE;
229 // guaranteed to be >= newCapacity
231 return newCapacity;
H A DMinMaxPriorityQueue.java919 int newCapacity = calculateNewCapacity();
920 Object[] newQueue = new Object[newCapacity];
929 int newCapacity = (oldCapacity < 64)
932 return capAtMaximumSize(newCapacity, maximumSize);
/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/
H A DExpandedNameTable.java250 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/
H A DIntMap.java142 int newCapacity = 2 * capacity;
143 Entry[] newTable = new Entry[newCapacity];
145 int bucketmask = newCapacity - 1;
160 capacity = newCapacity;
161 threshold = (int) (newCapacity * loadFactor);
/external/deqp/framework/delibs/depool/
H A DdePoolArray.c72 int newCapacity = deAlign32(size, 1 << DE_ARRAY_ELEMENTS_PER_PAGE_LOG2); local
73 int reqPageTableCapacity = newCapacity >> DE_ARRAY_ELEMENTS_PER_PAGE_LOG2;
127 DE_ASSERT(arr->capacity >= newCapacity);
/external/icu/icu4c/source/i18n/
H A Dsortkey.cpp99 uint8_t *CollationKey::reallocate(int32_t newCapacity, int32_t length) { argument
100 uint8_t *newBytes = static_cast<uint8_t *>(uprv_malloc(newCapacity));
107 fUnion.fFields.fCapacity = newCapacity;
H A Dcollationkeys.cpp185 int32_t newCapacity = 2 * buffer.getCapacity(); local
187 if (newCapacity < altCapacity) {
188 newCapacity = altCapacity;
190 if (newCapacity < 200) {
191 newCapacity = 200;
193 if(buffer.resize(newCapacity, len)==NULL) {
/external/icu/icu4c/source/layoutex/
H A DRunArrays.cpp55 void RunArray::grow(le_int32 newCapacity) argument
57 fLimits = (le_int32 *) LE_GROW_ARRAY(fLimits, newCapacity);
/external/icu/icu4c/source/i18n/unicode/
H A Dsortkey.h246 * Replaces the current bytes buffer with a new one of newCapacity
250 uint8_t *reallocate(int32_t newCapacity, int32_t length);
/external/skia/src/core/
H A DSkTDynamicHash.h249 void resize(int newCapacity) { argument
255 fCapacity = newCapacity;
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/text/
H A DRuleBasedCollator.java1135 int newCapacity = 2 * buffer_.length;
1137 if (newCapacity < altCapacity) {
1138 newCapacity = altCapacity;
1140 if (newCapacity < 200) {
1141 newCapacity = 200;
1143 // Do not call key_.ensureCapacity(newCapacity) because we do not
1146 byte[] newBytes = new byte[newCapacity];

Completed in 747 milliseconds

12