• Home
  • Raw
  • Download

Lines Matching refs:newCapacity

183     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()
228 length=newCapacity; in allocateInsteadAndCopy()
318 inline T *resize(int32_t newCapacity, int32_t length=0);
363 inline T *MaybeStackArray<T, stackCapacity>::resize(int32_t newCapacity, int32_t length) { in resize() argument
364 if(newCapacity>0) { in resize()
366 ::fprintf(::stderr,"MaybeStacArray (resize) alloc %d * %lu\n", newCapacity,sizeof(T)); in resize()
368 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); in resize()
374 if(length>newCapacity) { in resize()
375 length=newCapacity; in resize()
381 capacity=newCapacity; in resize()
496 inline H *resize(int32_t newCapacity, int32_t length=0);
538 inline H *MaybeStackHeaderAndArray<H, T, stackCapacity>::resize(int32_t newCapacity, in resize() argument
540 if(newCapacity>=0) { in resize()
542 …::fprintf(::stderr,"MaybeStackHeaderAndArray alloc %d + %d * %ul\n", sizeof(H),newCapacity,sizeof(… in resize()
544 H *p=(H *)uprv_malloc(sizeof(H)+newCapacity*sizeof(T)); in resize()
552 if(length>newCapacity) { in resize()
553 length=newCapacity; in resize()
559 capacity=newCapacity; in resize()