Home
last modified time | relevance | path

Searched refs:nitems_alloc (Results 1 – 3 of 3) sorted by relevance

/third_party/tzdata/
Dzic.c549 grow_nitems_alloc(ptrdiff_t *nitems_alloc, ptrdiff_t itemsize) in grow_nitems_alloc() argument
551 ptrdiff_t addend = (*nitems_alloc >> 1) + 1; in grow_nitems_alloc()
554 if (!ckd_add(nitems_alloc, *nitems_alloc, addend) in grow_nitems_alloc()
555 && !ckd_mul(&product, *nitems_alloc, itemsize) && product <= INDEX_MAX) in grow_nitems_alloc()
558 if (*nitems_alloc <= ((INDEX_MAX - 1) / 3 * 2) / itemsize) { in grow_nitems_alloc()
559 *nitems_alloc += addend; in grow_nitems_alloc()
560 return *nitems_alloc * itemsize; in grow_nitems_alloc()
568 ptrdiff_t *nitems_alloc) in growalloc() argument
570 return (nitems < *nitems_alloc in growalloc()
572 : erealloc(ptr, grow_nitems_alloc(nitems_alloc, itemsize))); in growalloc()
/third_party/skia/third_party/externals/icu/source/tools/tzcode/
Dzic.c449 growalloc(void *ptr, size_t itemsize, int nitems, int *nitems_alloc) in growalloc() argument
451 if (nitems < *nitems_alloc) in growalloc()
455 if ((amax - 1) / 3 * 2 < *nitems_alloc) in growalloc()
457 *nitems_alloc = *nitems_alloc + (*nitems_alloc >> 1) + 1; in growalloc()
458 return erealloc(ptr, size_product(*nitems_alloc, itemsize)); in growalloc()
/third_party/icu/icu4c/source/tools/tzcode/
Dzic.c450 growalloc(void *ptr, size_t itemsize, int nitems, int *nitems_alloc) in growalloc() argument
452 if (nitems < *nitems_alloc) in growalloc()
456 if ((amax - 1) / 3 * 2 < *nitems_alloc) in growalloc()
458 *nitems_alloc = *nitems_alloc + (*nitems_alloc >> 1) + 1; in growalloc()
459 return erealloc(ptr, size_product(*nitems_alloc, itemsize)); in growalloc()