Home | History | Annotate | Download | only in common

Lines Matching refs:initialCapacity

33 UVector64::UVector64(int32_t initialCapacity, UErrorCode &status) :
39 _init(initialCapacity, status);
44 void UVector64::_init(int32_t initialCapacity, UErrorCode &status) {
45 // Fix bogus initialCapacity values; avoid malloc(0)
46 if (initialCapacity < 1) {
47 initialCapacity = DEFAULT_CAPACITY;
49 if (maxCapacity>0 && maxCapacity<initialCapacity) {
50 initialCapacity = maxCapacity;
52 if (initialCapacity > (int32_t)(INT32_MAX / sizeof(int64_t))) {
53 initialCapacity = uprv_min(DEFAULT_CAPACITY, maxCapacity);
55 elements = (int64_t *)uprv_malloc(sizeof(int64_t)*initialCapacity);
59 capacity = initialCapacity;