Home
last modified time | relevance | path

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

12

/external/icu4c/common/
Dcmemory.h183 inline T *allocateInsteadAndReset(int32_t newCapacity=1);
195 inline T *allocateInsteadAndCopy(int32_t newCapacity=1, int32_t length=0);
206 inline T *LocalMemory<T>::allocateInsteadAndReset(int32_t newCapacity) { in allocateInsteadAndReset() argument
207 if(newCapacity>0) { in allocateInsteadAndReset()
208 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); in allocateInsteadAndReset()
210 uprv_memset(p, 0, newCapacity*sizeof(T)); in allocateInsteadAndReset()
222 inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t length) { in allocateInsteadAndCopy() argument
223 if(newCapacity>0) { in allocateInsteadAndCopy()
224 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); in allocateInsteadAndCopy()
227 if(length>newCapacity) { in allocateInsteadAndCopy()
[all …]
Ducharstriebuilder.cpp106 int32_t newCapacity; in add() local
108 newCapacity=1024; in add()
110 newCapacity=4*elementsCapacity; in add()
112 UCharsTrieElement *newElements=new UCharsTrieElement[newCapacity]; in add()
122 elementsCapacity=newCapacity; in add()
326 int32_t newCapacity=ucharsCapacity; in ensureCapacity() local
328 newCapacity*=2; in ensureCapacity()
329 } while(newCapacity<=length); in ensureCapacity()
330 UChar *newUChars=static_cast<UChar *>(uprv_malloc(newCapacity*2)); in ensureCapacity()
338 u_memcpy(newUChars+(newCapacity-ucharsLength), in ensureCapacity()
[all …]
Dbytestriebuilder.cpp156 int32_t newCapacity; in add() local
158 newCapacity=1024; in add()
160 newCapacity=4*elementsCapacity; in add()
162 BytesTrieElement *newElements=new BytesTrieElement[newCapacity]; in add()
172 elementsCapacity=newCapacity; in add()
378 int32_t newCapacity=bytesCapacity; in ensureCapacity() local
380 newCapacity*=2; in ensureCapacity()
381 } while(newCapacity<=length); in ensureCapacity()
382 char *newBytes=static_cast<char *>(uprv_malloc(newCapacity)); in ensureCapacity()
390 uprv_memcpy(newBytes+(newCapacity-bytesLength), in ensureCapacity()
[all …]
Dustr_wcs.cpp108 int32_t newCapacity = 2 * srcLength; in _strToWCS() local
109 if(newCapacity <= tempBufCapacity) { in _strToWCS()
110 newCapacity = _BUFFER_CAPACITY_MULTIPLIER * tempBufCapacity; in _strToWCS()
113 newCapacity, count, 1)) { in _strToWCS()
Dunistr.cpp1606 UnicodeString::cloneArrayIfNeeded(int32_t newCapacity, in cloneArrayIfNeeded() argument
1613 if(newCapacity == -1) { in cloneArrayIfNeeded()
1614 newCapacity = getCapacity(); in cloneArrayIfNeeded()
1634 newCapacity > getCapacity() in cloneArrayIfNeeded()
1638 growCapacity = newCapacity; in cloneArrayIfNeeded()
1639 } else if(newCapacity <= US_STACKBUF_SIZE && growCapacity > US_STACKBUF_SIZE) { in cloneArrayIfNeeded()
1665 (newCapacity < growCapacity && allocate(newCapacity)) in cloneArrayIfNeeded()
1671 newCapacity = getCapacity(); in cloneArrayIfNeeded()
1672 if(newCapacity < minLength) { in cloneArrayIfNeeded()
1673 minLength = newCapacity; in cloneArrayIfNeeded()
/external/webkit/Source/JavaScriptCore/wtf/url/src/
DURLBuffer.h119 int newCapacity = m_capacity ? m_capacity : minimumCapacity; in grow() local
121 if (newCapacity >= (1 << 30)) // Prevent overflow below. in grow()
123 newCapacity *= 2; in grow()
124 } while (newCapacity < m_capacity + minimumAdditionalCapacity); in grow()
125 resize(newCapacity); in grow()
/external/webkit/Source/JavaScriptCore/wtf/
DVector.h277 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/qemu/android/utils/
Dintmap.c100 int newCapacity; in aintMap_grow() local
111 newCapacity = oldCapacity*2; in aintMap_grow()
113 newCapacity = oldCapacity + (oldCapacity >> 2); in aintMap_grow()
115 AARRAY_RENEW(keys, newCapacity); in aintMap_grow()
116 AARRAY_RENEW(values, newCapacity); in aintMap_grow()
120 map->capacity = newCapacity; in aintMap_grow()
/external/webkit/Source/JavaScriptCore/wtf/text/
DStringBuilder.cpp79 void StringBuilder::reserveCapacity(unsigned newCapacity) in reserveCapacity() argument
83 if (newCapacity > m_buffer->length()) in reserveCapacity()
84 allocateBuffer(m_buffer->characters(), newCapacity); in reserveCapacity()
87 if (newCapacity > m_length) in reserveCapacity()
88 allocateBuffer(m_string.characters(), newCapacity); in reserveCapacity()
DStringBuilder.h102 void reserveCapacity(unsigned newCapacity);
/external/smack/src/org/jivesoftware/smack/util/collections/
DAbstractHashedMap.java578 int newCapacity = data.length * 2; in checkCapacity() local
579 if (newCapacity <= MAXIMUM_CAPACITY) { in checkCapacity()
580 ensureCapacity(newCapacity); in checkCapacity()
590 protected void ensureCapacity(int newCapacity) { in ensureCapacity() argument
592 if (newCapacity <= oldCapacity) { in ensureCapacity()
596 threshold = calculateThreshold(newCapacity, loadFactor); in ensureCapacity()
597 data = new HashEntry[newCapacity]; in ensureCapacity()
600 HashEntry<K, V> newEntries[] = new HashEntry[newCapacity]; in ensureCapacity()
609 int index = hashIndex(entry.hashCode, newCapacity); in ensureCapacity()
616 threshold = calculateThreshold(newCapacity, loadFactor); in ensureCapacity()
[all …]
/external/webkit/Source/JavaScriptCore/heap/
DConservativeRoots.cpp38 size_t newCapacity = m_capacity == inlineCapacity ? nonInlineCapacity : m_capacity * 2; in grow() local
39 …JSCell** newRoots = static_cast<JSCell**>(OSAllocator::reserveAndCommit(newCapacity * sizeof(JSCel… in grow()
43 m_capacity = newCapacity; in grow()
/external/icu4c/tools/toolutil/
Dtoolutil.cpp269 int32_t newCapacity; in utm_hasCapacity() local
279 newCapacity=capacity; in utm_hasCapacity()
281 newCapacity=2*mem->capacity; in utm_hasCapacity()
283 newCapacity=mem->maxCapacity; in utm_hasCapacity()
287 mem->array=uprv_malloc(newCapacity*mem->size); in utm_hasCapacity()
292 mem->array=uprv_realloc(mem->array, newCapacity*mem->size); in utm_hasCapacity()
299 mem->capacity=newCapacity; in utm_hasCapacity()
/external/webkit/Source/WebKit2/Platform/CoreIPC/
DArgumentEncoder.cpp71 …size_t newCapacity = std::max(alignedSize + size, std::max(static_cast<size_t>(32), m_bufferCapaci… in grow() local
73 m_buffer = static_cast<uint8_t*>(fastMalloc(newCapacity)); in grow()
75 m_buffer = static_cast<uint8_t*>(fastRealloc(m_buffer, newCapacity)); in grow()
79 m_bufferCapacity = newCapacity; in grow()
/external/srec/portable/src/
DArrayListImpl.c81 size_t newCapacity = impl->capacity * 2; in ArrayList_Insert_Internal() local
82 void** temp = REALLOC(impl->contents, newCapacity * sizeof(void*)); in ArrayList_Insert_Internal()
86 impl->capacity = newCapacity; in ArrayList_Insert_Internal()
126 size_t newCapacity = impl->capacity / 2; in ArrayList_Remove_Internal() local
129 if ((temp = REALLOC(impl->contents, newCapacity * sizeof(void*))) == NULL) in ArrayList_Remove_Internal()
132 impl->capacity = newCapacity; in ArrayList_Remove_Internal()
Dphashtable.c278 unsigned int newCapacity = ((oldCapacity << 1) | 0x01); in PHashTableRehash() local
284 sizeof(PHashTableEntry *) * newCapacity); in PHashTableRehash()
290 table->args.capacity = newCapacity; in PHashTableRehash()
291 table->threshold = (unsigned int)(newCapacity * table->args.maxLoadFactor); in PHashTableRehash()
293 for (i = oldCapacity; i < newCapacity; ++i) in PHashTableRehash()
302 idx = entry->hashCode % newCapacity; in PHashTableRehash()
/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/webkit/Source/JavaScriptCore/runtime/
DPropertyMapHashTable.h180 PassOwnPtr<PropertyTable> copy(JSGlobalData&, JSCell* owner, unsigned newCapacity);
193 void rehash(unsigned newCapacity);
451 …r<PropertyTable> PropertyTable::copy(JSGlobalData& globalData, JSCell* owner, unsigned newCapacity) in copy() argument
453 ASSERT(newCapacity >= m_keyCount); in copy()
457 if (sizeForCapacity(newCapacity) == m_indexSize) in copy()
459 return new PropertyTable(globalData, owner, newCapacity, *this); in copy()
487 inline void PropertyTable::rehash(unsigned newCapacity) in rehash() argument
493 m_indexSize = sizeForCapacity(newCapacity); in rehash()
/external/jmonkeyengine/engine/src/core/com/jme3/util/
DIntMap.java142 int newCapacity = 2 * capacity; in put() local
143 Entry[] newTable = new Entry[newCapacity]; in put()
145 int bucketmask = newCapacity - 1; in put()
160 capacity = newCapacity; in put()
161 threshold = (int) (newCapacity * loadFactor); in put()
/external/webkit/Source/WebCore/xml/
DXPathNodeSet.h48 void reserveCapacity(size_t newCapacity) { m_nodes.reserveCapacity(newCapacity); } in reserveCapacity() argument
/external/icu4c/i18n/
Dsortkey.cpp99 uint8_t *CollationKey::reallocate(int32_t newCapacity, int32_t length) { in reallocate() argument
100 uint8_t *newBytes = static_cast<uint8_t *>(uprv_malloc(newCapacity)); in reallocate()
107 fUnion.fFields.fCapacity = newCapacity; in reallocate()
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/misc/
DIntArrayList.java89 public void ensureCapacity(int newCapacity) { in ensureCapacity() argument
93 elements = new int[newCapacity]; in ensureCapacity()
/external/icu4c/layoutex/
DRunArrays.cpp55 void RunArray::grow(le_int32 newCapacity) in grow() argument
57 fLimits = (le_int32 *) LE_GROW_ARRAY(fLimits, newCapacity); in grow()
/external/guava/guava/src/com/google/common/collect/
DMinMaxPriorityQueue.java920 int newCapacity = calculateNewCapacity(); in growIfNeeded() local
921 Object[] newQueue = new Object[newCapacity]; in growIfNeeded()
930 int newCapacity = (oldCapacity < 64) in calculateNewCapacity() local
933 return capAtMaximumSize(newCapacity, maximumSize); in calculateNewCapacity()
/external/icu4c/i18n/unicode/
Dsortkey.h248 uint8_t *reallocate(int32_t newCapacity, int32_t length);

12