Home
last modified time | relevance | path

Searched refs:newSize (Results 1 – 4 of 4) sorted by relevance

/system/core/libcutils/
Darray.c120 int newSize = array->size - 1; in arrayRemove() local
123 if (index != newSize) { in arrayRemove()
125 (sizeof(void*)) * (newSize - index)); in arrayRemove()
128 array->size = newSize; in arrayRemove()
140 int arraySetSize(Array* array, int newSize) { in arraySetSize() argument
142 assert(newSize >= 0); in arraySetSize()
146 if (newSize > oldSize) { in arraySetSize()
148 int result = ensureCapacity(array, newSize); in arraySetSize()
155 sizeof(void*) * (newSize - oldSize)); in arraySetSize()
158 array->size = newSize; in arraySetSize()
Dopen_memstream.c94 size_t newSize; in ensureCapacity() local
97 newSize = kInitialSize; in ensureCapacity()
99 newSize = stream->allocSize; in ensureCapacity()
100 newSize += newSize / 2; /* expand by 3/2 */ in ensureCapacity()
103 if (newSize < neededSize) in ensureCapacity()
104 newSize = neededSize; in ensureCapacity()
106 stream->bufp, *stream->bufp, newSize)); in ensureCapacity()
107 char* newBuf = (char*) realloc(*stream->bufp, newSize); in ensureCapacity()
112 stream->allocSize = newSize; in ensureCapacity()
/system/core/libpixelflinger/codeflinger/tinyutils/
DSharedBuffer.cpp60 SharedBuffer* SharedBuffer::editResize(size_t newSize) const in editResize()
64 if (buf->mSize == newSize) return buf; in editResize()
65 buf = (SharedBuffer*)realloc(buf, sizeof(SharedBuffer) + newSize); in editResize()
67 buf->mSize = newSize; in editResize()
71 SharedBuffer* sb = alloc(newSize); in editResize()
74 memcpy(sb->data(), data(), newSize < mySize ? newSize : mySize); in editResize()
/system/core/libpixelflinger/codeflinger/
DCodeCache.cpp141 ssize_t Assembly::resize(size_t newSize) in resize() argument
143 mBase = (uint32_t*)mspace_realloc(getMspace(), mBase, newSize); in resize()
146 "of size %zd", newSize, kMaxCodeCacheCapacity); in resize()
147 mSize = newSize; in resize()