Searched refs:newCapacity (Results 1 - 1 of 1) sorted by relevance

/system/core/libcutils/
H A Darray.c50 int newCapacity = (oldCapacity == 0) ? INITIAL_CAPACITY : oldCapacity; local
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...]

Completed in 3 milliseconds