Home
last modified time | relevance | path

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

12

/external/icu/icu4c/source/common/
Dcmemory.h235 inline T *allocateInsteadAndReset(int32_t newCapacity=1);
247 inline T *allocateInsteadAndCopy(int32_t newCapacity=1, int32_t length=0);
258 inline T *LocalMemory<T>::allocateInsteadAndReset(int32_t newCapacity) { in allocateInsteadAndReset() argument
259 if(newCapacity>0) { in allocateInsteadAndReset()
260 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); in allocateInsteadAndReset()
262 uprv_memset(p, 0, newCapacity*sizeof(T)); in allocateInsteadAndReset()
274 inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t length) { in allocateInsteadAndCopy() argument
275 if(newCapacity>0) { in allocateInsteadAndCopy()
276 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); in allocateInsteadAndCopy()
279 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()
380 int32_t newCapacity=bytesCapacity; in ensureCapacity() local
382 newCapacity*=2; in ensureCapacity()
383 } while(newCapacity<=length); in ensureCapacity()
384 char *newBytes=static_cast<char *>(uprv_malloc(newCapacity)); in ensureCapacity()
392 uprv_memcpy(newBytes+(newCapacity-bytesLength), in ensureCapacity()
[all …]
Dedits.cpp214 int32_t newCapacity; in growArray() local
216 newCapacity = 2000; in growArray()
223 newCapacity = INT32_MAX; in growArray()
225 newCapacity = 2 * capacity; in growArray()
228 if ((newCapacity - capacity) < 5) { in growArray()
232 uint16_t *newArray = (uint16_t *)uprv_malloc((size_t)newCapacity * 2); in growArray()
240 capacity = newCapacity; in growArray()
/external/lzma/CPP/Common/
DMyVector.h24 unsigned newCapacity = _capacity + (_capacity >> 2) + 1; in ReserveOnePosition() local
25 T *p = new T[newCapacity]; in ReserveOnePosition()
30 _capacity = newCapacity; in ReserveOnePosition()
62 void Reserve(unsigned newCapacity) in Reserve() argument
64 if (newCapacity > _capacity) in Reserve()
66 T *p = new T[newCapacity]; in Reserve()
71 _capacity = newCapacity; in Reserve()
75 void ClearAndReserve(unsigned newCapacity) in ClearAndReserve() argument
78 if (newCapacity > _capacity) in ClearAndReserve()
83 _items = new 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/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/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/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.java245 int newCapacity = 2 * buffer.length; in ensureCapacity() local
247 if (newCapacity < altCapacity) { in ensureCapacity()
248 newCapacity = altCapacity; in ensureCapacity()
250 if (newCapacity < 200) { in ensureCapacity()
251 newCapacity = 200; in ensureCapacity()
253 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/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DEdits.java179 int newCapacity; in growArray() local
181 newCapacity = 2000; in growArray()
185 newCapacity = Integer.MAX_VALUE; in growArray()
187 newCapacity = 2 * array.length; in growArray()
190 if ((newCapacity - array.length) < 5) { in growArray()
193 array = Arrays.copyOf(array, newCapacity); in growArray()
/external/icu/icu4c/source/i18n/
Dnumber_stringbuilder.cpp242 int32_t newCapacity = (fLength + count) * 2; in prepareForInsertHelper() local
243 int32_t newZero = newCapacity / 2 - (fLength + count) / 2; in prepareForInsertHelper()
246 auto newChars = static_cast<char16_t *> (uprv_malloc(sizeof(char16_t) * newCapacity)); in prepareForInsertHelper()
247 auto newFields = static_cast<Field *>(uprv_malloc(sizeof(Field) * newCapacity)); in prepareForInsertHelper()
273 fChars.heap.capacity = newCapacity; in prepareForInsertHelper()
275 fFields.heap.capacity = newCapacity; in prepareForInsertHelper()
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()
Dcollationkeys.cpp187 int32_t newCapacity = 2 * buffer.getCapacity(); in ensureCapacity() local
189 if (newCapacity < altCapacity) { in ensureCapacity()
190 newCapacity = altCapacity; in ensureCapacity()
192 if (newCapacity < 200) { in ensureCapacity()
193 newCapacity = 200; in ensureCapacity()
195 if(buffer.resize(newCapacity, len)==NULL) { in ensureCapacity()
/external/icu/android_icu4j/src/main/java/android/icu/text/
DEdits.java176 int newCapacity; in growArray() local
178 newCapacity = 2000; in growArray()
182 newCapacity = Integer.MAX_VALUE; in growArray()
184 newCapacity = 2 * array.length; in growArray()
187 if ((newCapacity - array.length) < 5) { in growArray()
190 array = Arrays.copyOf(array, newCapacity); in growArray()
/external/protobuf/objectivec/
DGPBArray.m248 //%- (void)internalResizeToCapacity:(NSUInteger)newCapacity {
249 //% _values = reallocf(_values, newCapacity * sizeof(TYPE));
255 //% (unsigned long)(newCapacity * sizeof(TYPE))];
257 //% _capacity = newCapacity;
430 - (void)internalResizeToCapacity:(NSUInteger)newCapacity {
431 _values = reallocf(_values, newCapacity * sizeof(int32_t));
437 (unsigned long)(newCapacity * sizeof(int32_t))];
439 _capacity = newCapacity;
677 - (void)internalResizeToCapacity:(NSUInteger)newCapacity {
678 _values = reallocf(_values, newCapacity * sizeof(uint32_t));
[all …]

12