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

1 2 3 4

  /system/core/libcutils/
array.c 50 int newCapacity = (oldCapacity == 0) ? INITIAL_CAPACITY : oldCapacity;
57 while (newCapacity < capacity) {
58 int newCap = newCapacity*2;
60 if (newCap < newCapacity || newCap > MAX_CAPACITY) {
63 newCapacity = newCap;
67 if (newCapacity < 0 || newCapacity > MAX_CAPACITY)
73 newContents = malloc(newCapacity * sizeof(void*));
79 newContents = realloc(array->contents, sizeof(void*) * newCapacity);
85 array->capacity = newCapacity;
    [all...]
  /external/icu4c/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/webkit/Source/JavaScriptCore/wtf/url/src/
URLBuffer.h 119 int newCapacity = m_capacity ? m_capacity : minimumCapacity;
121 if (newCapacity >= (1 << 30)) // Prevent overflow below.
123 newCapacity *= 2;
124 } while (newCapacity < m_capacity + minimumAdditionalCapacity);
125 resize(newCapacity);
  /external/webkit/Source/JavaScriptCore/heap/
ConservativeRoots.cpp 38 size_t newCapacity = m_capacity == inlineCapacity ? nonInlineCapacity : m_capacity * 2;
39 JSCell** newRoots = static_cast<JSCell**>(OSAllocator::reserveAndCommit(newCapacity * sizeof(JSCell*)));
43 m_capacity = newCapacity;
  /packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
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];
  /external/webkit/Source/JavaScriptCore/wtf/text/
StringBuilder.cpp 79 void StringBuilder::reserveCapacity(unsigned newCapacity)
83 if (newCapacity > m_buffer->length())
84 allocateBuffer(m_buffer->characters(), newCapacity);
87 if (newCapacity > m_length)
88 allocateBuffer(m_string.characters(), newCapacity);
StringBuilder.h 102 void reserveCapacity(unsigned newCapacity);
  /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/webkit/Source/WebCore/xml/
XPathNodeSet.h 48 void reserveCapacity(size_t newCapacity) { m_nodes.reserveCapacity(newCapacity); }
  /external/icu4c/tools/toolutil/
toolutil.cpp 269 int32_t newCapacity;
279 newCapacity=capacity;
281 newCapacity=2*mem->capacity;
283 newCapacity=mem->maxCapacity;
287 mem->array=uprv_malloc(newCapacity*mem->size);
292 mem->array=uprv_realloc(mem->array, newCapacity*mem->size);
299 mem->capacity=newCapacity;
  /external/webkit/Source/WebKit2/Platform/CoreIPC/
ArgumentEncoder.cpp 71 size_t newCapacity = std::max(alignedSize + size, std::max(static_cast<size_t>(32), m_bufferCapacity + m_bufferCapacity / 4 + 1));
73 m_buffer = static_cast<uint8_t*>(fastMalloc(newCapacity));
75 m_buffer = static_cast<uint8_t*>(fastRealloc(m_buffer, newCapacity));
79 m_bufferCapacity = newCapacity;
  /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/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;
phashtable.c 278 unsigned int newCapacity = ((oldCapacity << 1) | 0x01);
284 sizeof(PHashTableEntry *) * newCapacity);
290 table->args.capacity = newCapacity;
291 table->threshold = (unsigned int)(newCapacity * table->args.maxLoadFactor);
293 for (i = oldCapacity; i < newCapacity; ++i)
302 idx = entry->hashCode % newCapacity;
  /external/webkit/Source/JavaScriptCore/wtf/
Vector.h 277 void allocateBuffer(size_t newCapacity)
279 ASSERT(newCapacity);
280 m_capacity = newCapacity;
281 if (newCapacity > std::numeric_limits<size_t>::max() / sizeof(T))
283 m_buffer = static_cast<T*>(fastMalloc(newCapacity * sizeof(T)));
286 bool tryAllocateBuffer(size_t newCapacity)
288 ASSERT(newCapacity);
289 if (newCapacity > std::numeric_limits<size_t>::max() / sizeof(T))
293 if (tryFastMalloc(newCapacity * sizeof(T)).getValue(newBuffer)) {
294 m_capacity = newCapacity;
    [all...]
  /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;
  /external/jmonkeyengine/engine/src/core/com/jme3/util/
IntMap.java 142 int newCapacity = 2 * capacity;
143 Entry[] newTable = new Entry[newCapacity];
145 int bucketmask = newCapacity - 1;
160 capacity = newCapacity;
161 threshold = (int) (newCapacity * loadFactor);
  /external/smack/src/org/jivesoftware/smack/util/collections/
AbstractHashedMap.java 578 int newCapacity = data.length * 2;
579 if (newCapacity <= MAXIMUM_CAPACITY) {
580 ensureCapacity(newCapacity);
588 * @param newCapacity the new capacity of the array (a power of two, less or equal to max)
590 protected void ensureCapacity(int newCapacity) {
592 if (newCapacity <= oldCapacity) {
596 threshold = calculateThreshold(newCapacity, loadFactor);
597 data = new HashEntry[newCapacity];
600 HashEntry<K, V> newEntries[] = new HashEntry[newCapacity];
609 int index = hashIndex(entry.hashCode, newCapacity);
    [all...]
  /external/icu4c/i18n/
sortkey.cpp 99 uint8_t *CollationKey::reallocate(int32_t newCapacity, int32_t length) {
100 uint8_t *newBytes = static_cast<uint8_t *>(uprv_malloc(newCapacity));
107 fUnion.fFields.fCapacity = newCapacity;
  /external/webkit/Source/JavaScriptCore/runtime/
PropertyMapHashTable.h 180 PassOwnPtr<PropertyTable> copy(JSGlobalData&, JSCell* owner, unsigned newCapacity);
193 void rehash(unsigned newCapacity);
451 inline PassOwnPtr<PropertyTable> PropertyTable::copy(JSGlobalData& globalData, JSCell* owner, unsigned newCapacity)
453 ASSERT(newCapacity >= m_keyCount);
457 if (sizeForCapacity(newCapacity) == m_indexSize)
459 return new PropertyTable(globalData, owner, newCapacity, *this);
487 inline void PropertyTable::rehash(unsigned newCapacity)
493 m_indexSize = sizeForCapacity(newCapacity);
  /libcore/luni/src/main/java/java/util/
ArrayList.java 154 Object[] newArray = new Object[newCapacity(s)];
173 private static int newCapacity(int currentCapacity) {
197 int newCapacity = newCapacity(newSize - 1); // ~33% growth room
198 Object[] newArray = new Object[newCapacity];
238 int newCapacity = newCapacity(newSize - 1); // ~33% growth room
239 Object[] newArray = new Object[newCapacity];
  /external/icu4c/layoutex/
RunArrays.cpp 55 void RunArray::grow(le_int32 newCapacity)
57 fLimits = (le_int32 *) LE_GROW_ARRAY(fLimits, newCapacity);

Completed in 300 milliseconds

1 2 3 4