/libcore/ojluni/src/main/java/java/io/ |
ByteArrayOutputStream.java | 113 int newCapacity = oldCapacity << 1; 114 if (newCapacity - minCapacity < 0) 115 newCapacity = minCapacity; 116 if (newCapacity - MAX_ARRAY_SIZE > 0) 117 newCapacity = hugeCapacity(minCapacity); 118 buf = Arrays.copyOf(buf, newCapacity);
|
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/internal/ |
stack.h | 153 size_t newCapacity;
157 newCapacity = initialCapacity_;
159 newCapacity = GetCapacity();
160 newCapacity += (newCapacity + 1) / 2;
163 if (newCapacity < newSize)
164 newCapacity = newSize;
166 Resize(newCapacity);
169 void Resize(size_t newCapacity) {
171 stack_ = (char*)allocator_->Realloc(stack_, GetCapacity(), newCapacity);
[all...] |
/external/icu/icu4c/source/common/ |
cmemory.h | 236 * @param newCapacity must be >0 239 inline T *allocateInsteadAndReset(int32_t newCapacity=1); 245 * @param newCapacity must be >0 251 inline T *allocateInsteadAndCopy(int32_t newCapacity=1, int32_t length=0); 262 inline T *LocalMemory<T>::allocateInsteadAndReset(int32_t newCapacity) { 263 if(newCapacity>0) { 264 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); 266 uprv_memset(p, 0, newCapacity*sizeof(T)); 278 inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t length) { 279 if(newCapacity>0) [all...] |
bytestriebuilder.cpp | 158 int32_t newCapacity; 160 newCapacity=1024; 162 newCapacity=4*elementsCapacity; 164 BytesTrieElement *newElements=new BytesTrieElement[newCapacity]; 174 elementsCapacity=newCapacity; 380 int32_t newCapacity=bytesCapacity; 382 newCapacity*=2; 383 } while(newCapacity<=length); 384 char *newBytes=static_cast<char *>(uprv_malloc(newCapacity)); 392 uprv_memcpy(newBytes+(newCapacity-bytesLength) [all...] |
ucharstriebuilder.cpp | 108 int32_t newCapacity; 110 newCapacity=1024; 112 newCapacity=4*elementsCapacity; 114 UCharsTrieElement *newElements=new UCharsTrieElement[newCapacity]; 124 elementsCapacity=newCapacity; 328 int32_t newCapacity=ucharsCapacity; 330 newCapacity*=2; 331 } while(newCapacity<=length); 332 UChar *newUChars=static_cast<UChar *>(uprv_malloc(newCapacity*2)); 340 u_memcpy(newUChars+(newCapacity-ucharsLength) [all...] |
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
ResizableIntArray.java | 75 final int newCapacity = calculateCapacity(minimumCapacity); 76 if (newCapacity > 0) { 78 mArray = Arrays.copyOf(mArray, newCapacity); 109 final int newCapacity = calculateCapacity(ip.mLength); 110 if (newCapacity > 0) { 112 mArray = new int[newCapacity];
|
/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/ |
UVector32.java | 44 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; 45 int[] newBuffer = new int[newCapacity];
|
UVector64.java | 44 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; 45 long[] newBuffer = new long[newCapacity];
|
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/impl/coll/ |
UVector32.java | 40 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; 41 int[] newBuffer = new int[newCapacity];
|
UVector64.java | 40 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; 41 long[] newBuffer = new long[newCapacity];
|
/frameworks/support/compat/java/android/support/v4/util/ |
CircularIntArray.java | 31 int newCapacity = n << 1; 32 if (newCapacity < 0) { 35 int[] a = new int[newCapacity]; 41 mCapacityBitmask = newCapacity - 1;
|
CircularArray.java | 30 int newCapacity = n << 1; 31 if (newCapacity < 0) { 34 Object[] a = new Object[newCapacity]; 40 mCapacityBitmask = newCapacity - 1;
|
/external/lzma/CPP/Common/ |
MyVector.h | 24 unsigned newCapacity = _capacity + (_capacity >> 2) + 1;
25 T *p = new T[newCapacity];
30 _capacity = newCapacity;
62 void Reserve(unsigned newCapacity)
64 if (newCapacity > _capacity)
66 T *p = new T[newCapacity];
71 _capacity = newCapacity;
75 void ClearAndReserve(unsigned newCapacity)
78 if (newCapacity > _capacity)
83 _items = new T[newCapacity];
[all...] |
/external/icu/icu4c/source/tools/toolutil/ |
toolutil.cpp | 297 int32_t newCapacity; 307 newCapacity=capacity; 309 newCapacity=2*mem->capacity; 311 newCapacity=mem->maxCapacity; 315 mem->array=uprv_malloc(newCapacity*mem->size); 320 mem->array=uprv_realloc(mem->array, newCapacity*mem->size); 327 mem->capacity=newCapacity;
|
/external/icu/android_icu4j/src/main/java/android/icu/util/ |
BytesTrieBuilder.java | 159 int newCapacity=bytes.length; 161 newCapacity*=2; 162 } while(newCapacity<=length); 163 byte[] newBytes=new byte[newCapacity];
|
CharsTrieBuilder.java | 137 int newCapacity=chars.length; 139 newCapacity*=2; 140 } while(newCapacity<=length); 141 char[] newChars=new char[newCapacity];
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/ |
BytesTrieBuilder.java | 163 int newCapacity=bytes.length; 165 newCapacity*=2; 166 } while(newCapacity<=length); 167 byte[] newBytes=new byte[newCapacity];
|
CharsTrieBuilder.java | 141 int newCapacity=chars.length; 143 newCapacity*=2; 144 } while(newCapacity<=length); 145 char[] newChars=new char[newCapacity];
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
CompositeListAdapter.java | 72 int newCapacity = mSize + 2; 73 ListAdapter[] newAdapters = new ListAdapter[newCapacity]; 77 int[] newCounts = new int[newCapacity]; 81 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];
|
/system/chre/util/include/chre/util/ |
dynamic_vector_impl.h | 162 bool DynamicVector<ElementType>::reserve(size_type newCapacity) { 166 if (newCapacity <= mCapacity) { 170 memoryAlloc(newCapacity * sizeof(ElementType))); 176 mCapacity = newCapacity; 342 size_type newCapacity = mCapacity * 2; 343 if (newCapacity == 0) { 344 newCapacity = 1; 347 if (!reserve(newCapacity)) {
|
/external/guava/guava/src/com/google/common/collect/ |
ImmutableCollection.java | 223 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;
|
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
Edits.java | 172 int newCapacity; 174 newCapacity = 2000; 178 newCapacity = Integer.MAX_VALUE; 180 newCapacity = 2 * array.length; 183 if ((newCapacity - array.length) < 5) { 186 array = Arrays.copyOf(array, newCapacity);
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
Edits.java | 175 int newCapacity; 177 newCapacity = 2000; 181 newCapacity = Integer.MAX_VALUE; 183 newCapacity = 2 * array.length; 186 if ((newCapacity - array.length) < 5) { 189 array = Arrays.copyOf(array, 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;
|