HomeSort by relevance Sort by last modified time
    Searched refs:newCapacity (Results 1 - 25 of 137) sorted by null

1 2 3 4 5 6

  /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/chromium_org/third_party/icu/source/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...]
  /external/icu/icu4c/source/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...]
  /external/qemu/android/base/containers/
PodVector.cpp 84 size_t newCapacity = oldCapacity;
85 while (newCapacity < newSize) {
86 size_t newCapacity2 = newCapacity + (newCapacity >> 2) + 8;
87 if (newCapacity2 < newCapacity || newCapacity > kMaxSize) {
88 newCapacity = kMaxSize;
90 newCapacity = newCapacity2;
93 reserve(newCapacity, itemSize);
  /sdk/emulator/opengl/shared/emugl/common/
pod_vector.cpp 78 size_t newCapacity = oldCapacity;
79 while (newCapacity < newSize) {
80 size_t newCapacity2 = newCapacity + (newCapacity >> 2) + 8;
81 if (newCapacity2 < newCapacity || newCapacity > kMaxSize) {
82 newCapacity = kMaxSize;
84 newCapacity = newCapacity2;
87 reserve(newCapacity, itemSize);
id_to_object_map.cpp 210 size_t newCapacity = 1U << newShift;
212 ::calloc(sizeof(newKeys[0]), newCapacity));
214 ::calloc(sizeof(newValues[0]), newCapacity));
215 for (size_t n = 0; n < newCapacity; ++n)
  /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];
  /frameworks/support/v4/java/android/support/v4/util/
CircularArray.java 30 int newCapacity = n << 1;
31 if (newCapacity < 0) {
34 Object[] a = new Object[newCapacity];
40 mCapacityBitmask = newCapacity - 1;
  /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 47 void reserveCapacity(size_t newCapacity) { m_nodes.reserveCapacity(newCapacity); }
  /external/chromium_org/third_party/icu/source/tools/toolutil/
toolutil.cpp 291 int32_t newCapacity;
301 newCapacity=capacity;
303 newCapacity=2*mem->capacity;
305 newCapacity=mem->maxCapacity;
309 mem->array=uprv_malloc(newCapacity*mem->size);
314 mem->array=uprv_realloc(mem->array, newCapacity*mem->size);
321 mem->capacity=newCapacity;
  /external/icu/icu4c/source/tools/toolutil/
toolutil.cpp 292 int32_t newCapacity;
302 newCapacity=capacity;
304 newCapacity=2*mem->capacity;
306 newCapacity=mem->maxCapacity;
310 mem->array=uprv_malloc(newCapacity*mem->size);
315 mem->array=uprv_realloc(mem->array, newCapacity*mem->size);
322 mem->capacity=newCapacity;
  /external/chromium_org/third_party/WebKit/Source/platform/
PurgeableVector.cpp 250 size_t newCapacity = std::max(capacity, static_cast<size_t>(m_discardableCapacity * growthFactor));
257 newCapacity = (newCapacity + kPageSize - 1) & ~(kPageSize - 1);
259 return std::max(capacity, newCapacity); // Overflow check.
  /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 193 void StringBuilder::reserveCapacity(unsigned newCapacity)
197 if (newCapacity > m_buffer->length()) {
199 reallocateBuffer<LChar>(newCapacity);
201 reallocateBuffer<UChar>(newCapacity);
205 if (newCapacity > m_length) {
208 allocateBuffer(nullPlaceholder, newCapacity);
210 allocateBuffer(m_string.characters8(), newCapacity);
212 allocateBuffer(m_string.characters16(), newCapacity);
  /frameworks/base/core/java/android/util/
IntArray.java 100 final int newCapacity = targetCap > minCapacity ? targetCap : minCapacity;
101 final int[] newValues = ArrayUtils.newUnpaddedIntArray(newCapacity);
LongArray.java 99 final int newCapacity = targetCap > minCapacity ? targetCap : minCapacity;
100 final long[] newValues = ArrayUtils.newUnpaddedLongArray(newCapacity);
  /external/qemu/android/base/
Log.cpp 200 size_t newCapacity = mCapacity;
201 while (newCapacity < newSize)
202 newCapacity += (newCapacity >> 2) + 32;
204 ::realloc(mString, newCapacity + 1));
205 mCapacity = 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;

Completed in 928 milliseconds

1 2 3 4 5 6