Searched refs:newSize (Results 1 – 3 of 3) sorted by relevance
/system/core/libutils/ |
D | SharedBuffer.cpp | 65 SharedBuffer* SharedBuffer::editResize(size_t newSize) const in editResize() 69 if (buf->mSize == newSize) return buf; in editResize() 72 LOG_ALWAYS_FATAL_IF((newSize >= (SIZE_MAX - sizeof(SharedBuffer))), in editResize() 73 "Invalid buffer size %zu", newSize); in editResize() 75 buf = (SharedBuffer*)realloc(buf, sizeof(SharedBuffer) + newSize); in editResize() 77 buf->mSize = newSize; in editResize() 81 SharedBuffer* sb = alloc(newSize); in editResize() 84 memcpy(sb->data(), data(), newSize < mySize ? newSize : mySize); in editResize()
|
/system/core/libcutils/ |
D | open_memstream.c | 92 size_t newSize; in ensureCapacity() local 95 newSize = kInitialSize; in ensureCapacity() 97 newSize = stream->allocSize; in ensureCapacity() 98 newSize += newSize / 2; /* expand by 3/2 */ in ensureCapacity() 101 if (newSize < neededSize) in ensureCapacity() 102 newSize = neededSize; in ensureCapacity() 104 stream->bufp, *stream->bufp, newSize)); in ensureCapacity() 105 char* newBuf = (char*) realloc(*stream->bufp, newSize); in ensureCapacity() 110 stream->allocSize = newSize; in ensureCapacity()
|
/system/core/libpixelflinger/codeflinger/ |
D | CodeCache.cpp | 141 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()
|