Home
last modified time | relevance | path

Searched refs:newCapacity (Results 1 – 25 of 56) sorted by relevance

123

/external/icu/icu4c/source/common/
Dcmemory.h214 inline T *allocateInsteadAndReset(int32_t newCapacity=1);
226 inline T *allocateInsteadAndCopy(int32_t newCapacity=1, int32_t length=0);
237 inline T *LocalMemory<T>::allocateInsteadAndReset(int32_t newCapacity) { in allocateInsteadAndReset() argument
238 if(newCapacity>0) { in allocateInsteadAndReset()
239 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); in allocateInsteadAndReset()
241 uprv_memset(p, 0, newCapacity*sizeof(T)); in allocateInsteadAndReset()
253 inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t length) { in allocateInsteadAndCopy() argument
254 if(newCapacity>0) { in allocateInsteadAndCopy()
255 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); in allocateInsteadAndCopy()
258 if(length>newCapacity) { in allocateInsteadAndCopy()
[all …]
Ducharstriebuilder.cpp108 int32_t newCapacity; in add() local
110 newCapacity=1024; in add()
112 newCapacity=4*elementsCapacity; in add()
114 UCharsTrieElement *newElements=new UCharsTrieElement[newCapacity]; in add()
124 elementsCapacity=newCapacity; in add()
328 int32_t newCapacity=ucharsCapacity; in ensureCapacity() local
330 newCapacity*=2; in ensureCapacity()
331 } while(newCapacity<=length); in ensureCapacity()
332 UChar *newUChars=static_cast<UChar *>(uprv_malloc(newCapacity*2)); in ensureCapacity()
340 u_memcpy(newUChars+(newCapacity-ucharsLength), in ensureCapacity()
[all …]
Dbytestriebuilder.cpp158 int32_t newCapacity; in add() local
160 newCapacity=1024; in add()
162 newCapacity=4*elementsCapacity; in add()
164 BytesTrieElement *newElements=new BytesTrieElement[newCapacity]; in add()
174 elementsCapacity=newCapacity; in add()
381 int32_t newCapacity=bytesCapacity; in ensureCapacity() local
383 newCapacity*=2; in ensureCapacity()
384 } while(newCapacity<=length); in ensureCapacity()
385 char *newBytes=static_cast<char *>(uprv_malloc(newCapacity)); in ensureCapacity()
393 uprv_memcpy(newBytes+(newCapacity-bytesLength), in ensureCapacity()
[all …]
/external/lzma/CPP/Common/
DMyVector.h24 unsigned newCapacity = _capacity + (_capacity >> 2) + 1; in ReserveOnePosition() local
26 MY_ARRAY_NEW(p, T, newCapacity); in ReserveOnePosition()
32 _capacity = newCapacity; in ReserveOnePosition()
65 void Reserve(unsigned newCapacity) in Reserve() argument
67 if (newCapacity > _capacity) in Reserve()
70 MY_ARRAY_NEW(p, T, newCapacity); in Reserve()
76 _capacity = newCapacity; in Reserve()
80 void ClearAndReserve(unsigned newCapacity) in ClearAndReserve() argument
83 if (newCapacity > _capacity) in ClearAndReserve()
88 MY_ARRAY_NEW(_items, T, newCapacity) in ClearAndReserve()
[all …]
/external/guava/guava/src/com/google/common/collect/
DImmutableCollection.java223 int newCapacity = oldCapacity + (oldCapacity >> 1) + 1; in expandedCapacity() local
224 if (newCapacity < minCapacity) { in expandedCapacity()
225 newCapacity = Integer.highestOneBit(minCapacity - 1) << 1; in expandedCapacity()
227 if (newCapacity < 0) { in expandedCapacity()
228 newCapacity = Integer.MAX_VALUE; in expandedCapacity()
231 return newCapacity; in expandedCapacity()
/external/icu/icu4c/source/tools/toolutil/
Dtoolutil.cpp297 int32_t newCapacity; in utm_hasCapacity() local
307 newCapacity=capacity; in utm_hasCapacity()
309 newCapacity=2*mem->capacity; in utm_hasCapacity()
311 newCapacity=mem->maxCapacity; in utm_hasCapacity()
315 mem->array=uprv_malloc(newCapacity*mem->size); in utm_hasCapacity()
320 mem->array=uprv_realloc(mem->array, newCapacity*mem->size); in utm_hasCapacity()
327 mem->capacity=newCapacity; in utm_hasCapacity()
/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/
DExpandedNameTable.java250 int newCapacity = 2 * oldCapacity + 1; in rehash() local
251 m_capacity = newCapacity; in rehash()
252 m_threshold = (int)(newCapacity * m_loadFactor); in rehash()
254 m_table = new HashEntry[newCapacity]; in rehash()
262 int newIndex = e.hash % newCapacity; in rehash()
/external/skqp/src/core/
DSkTDynamicHash.h245 auto newCapacity = fCapacity > 0 ? fCapacity : 4; in maybeGrow() local
250 newCapacity *= 2; in maybeGrow()
252 SkASSERT(newCapacity > fCount + 1); in maybeGrow()
254 this->resize(newCapacity); in maybeGrow()
258 void resize(int newCapacity) { in resize() argument
264 fCapacity = newCapacity; in resize()
/external/skia/src/core/
DSkTDynamicHash.h245 auto newCapacity = fCapacity > 0 ? fCapacity : 4; in maybeGrow() local
250 newCapacity *= 2; in maybeGrow()
252 SkASSERT(newCapacity > fCount + 1); in maybeGrow()
254 this->resize(newCapacity); in maybeGrow()
258 void resize(int newCapacity) { in resize() argument
264 fCapacity = newCapacity; in resize()
/external/icu/android_icu4j/src/main/java/android/icu/util/
DCharsTrieBuilder.java137 int newCapacity=chars.length; in ensureCapacity() local
139 newCapacity*=2; in ensureCapacity()
140 } while(newCapacity<=length); in ensureCapacity()
141 char[] newChars=new char[newCapacity]; in ensureCapacity()
DBytesTrieBuilder.java159 int newCapacity=bytes.length; in ensureCapacity() local
161 newCapacity*=2; in ensureCapacity()
162 } while(newCapacity<=length); in ensureCapacity()
163 byte[] newBytes=new byte[newCapacity]; in ensureCapacity()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DCharsTrieBuilder.java141 int newCapacity=chars.length; in ensureCapacity() local
143 newCapacity*=2; in ensureCapacity()
144 } while(newCapacity<=length); in ensureCapacity()
145 char[] newChars=new char[newCapacity]; in ensureCapacity()
DBytesTrieBuilder.java163 int newCapacity=bytes.length; in ensureCapacity() local
165 newCapacity*=2; in ensureCapacity()
166 } while(newCapacity<=length); in ensureCapacity()
167 byte[] newBytes=new byte[newCapacity]; in ensureCapacity()
/external/guice/extensions/servlet/src/com/google/inject/servlet/
DServletUtils.java216 int newCapacity = cap + (cap >> 1); // *1.5 in ensureCapacity() local
217 if (newCapacity < minCapacity) { in ensureCapacity()
219 newCapacity = minCapacity; in ensureCapacity()
222 bytes = Arrays.copyOf(bytes, newCapacity); in ensureCapacity()
/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/
DUVector32.java44 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; in ensureAppendCapacity() local
45 int[] newBuffer = new int[newCapacity]; in ensureAppendCapacity()
DUVector64.java44 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; in ensureAppendCapacity() local
45 long[] newBuffer = new long[newCapacity]; in ensureAppendCapacity()
DCollationKeys.java251 int newCapacity = 2 * buffer.length; in ensureCapacity() local
253 if (newCapacity < altCapacity) { in ensureCapacity()
254 newCapacity = altCapacity; in ensureCapacity()
256 if (newCapacity < 200) { in ensureCapacity()
257 newCapacity = 200; in ensureCapacity()
259 byte[] newbuf = new byte[newCapacity]; in ensureCapacity()
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/impl/coll/
DUVector64.java40 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; in ensureAppendCapacity() local
41 long[] newBuffer = new long[newCapacity]; in ensureAppendCapacity()
DUVector32.java40 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; in ensureAppendCapacity() local
41 int[] newBuffer = new int[newCapacity]; in ensureAppendCapacity()
DCollationKeys.java241 int newCapacity = 2 * buffer.length; in ensureCapacity() local
243 if (newCapacity < altCapacity) { in ensureCapacity()
244 newCapacity = altCapacity; in ensureCapacity()
246 if (newCapacity < 200) { in ensureCapacity()
247 newCapacity = 200; in ensureCapacity()
249 byte[] newbuf = new byte[newCapacity]; in ensureCapacity()
/external/deqp/framework/delibs/depool/
DdePoolArray.c72 int newCapacity = deAlign32(size, 1 << DE_ARRAY_ELEMENTS_PER_PAGE_LOG2); in dePoolArray_reserve() local
73 int reqPageTableCapacity = newCapacity >> DE_ARRAY_ELEMENTS_PER_PAGE_LOG2; in dePoolArray_reserve()
127 DE_ASSERT(arr->capacity >= newCapacity); in dePoolArray_reserve()
/external/cldr/tools/java/org/unicode/cldr/util/
DDictionary.java517 int newCapacity = sourceOffsets.length * 2 + 1; in setOffsets() local
518 if (newCapacity < length + 50) { in setOffsets()
519 newCapacity = length + 50; in setOffsets()
521 int[] temp = new int[newCapacity]; in setOffsets()
/external/icu/icu4c/source/i18n/
Dsortkey.cpp101 uint8_t *CollationKey::reallocate(int32_t newCapacity, int32_t length) { in reallocate() argument
102 uint8_t *newBytes = static_cast<uint8_t *>(uprv_malloc(newCapacity)); in reallocate()
109 fUnion.fFields.fCapacity = newCapacity; in reallocate()
Dnumber_stringbuilder.cpp268 int32_t newCapacity = (fLength + count) * 2; in prepareForInsertHelper() local
269 int32_t newZero = newCapacity / 2 - (fLength + count) / 2; in prepareForInsertHelper()
272 auto newChars = static_cast<char16_t *> (uprv_malloc(sizeof(char16_t) * newCapacity)); in prepareForInsertHelper()
273 auto newFields = static_cast<Field *>(uprv_malloc(sizeof(Field) * newCapacity)); in prepareForInsertHelper()
299 fChars.heap.capacity = newCapacity; in prepareForInsertHelper()
301 fFields.heap.capacity = newCapacity; in prepareForInsertHelper()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DEdits.java218 int newCapacity; in growArray() local
220 newCapacity = 2000; in growArray()
224 newCapacity = Integer.MAX_VALUE; in growArray()
226 newCapacity = 2 * array.length; in growArray()
229 if ((newCapacity - array.length) < 5) { in growArray()
232 array = Arrays.copyOf(array, newCapacity); in growArray()

123