Home
last modified time | relevance | path

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

/system/chre/chpp/platform/linux/
Dmemory.c75 void *chppRealloc(void *oldPtr, const size_t newSize, const size_t oldSize) { in chppRealloc() argument
78 if (newSize != oldSize) { in chppRealloc()
83 realloc(oldHeader, newSize + sizeof(struct ChppAllocHeader)); in chppRealloc()
86 newHeader->bytes = newSize; in chppRealloc()
90 if (newSize > oldSize) { in chppRealloc()
91 gTotalAllocBytes += (newSize - oldSize); in chppRealloc()
93 gTotalAllocBytes -= (oldSize - newSize); in chppRealloc()
99 CHPP_LOGI("%s: size %zu total (after realloc) %zu", __func__, newSize, in chppRealloc()
/system/core/libutils/
DSharedBuffer.cpp68 SharedBuffer* SharedBuffer::editResize(size_t newSize) const in editResize()
72 if (buf->mSize == newSize) return buf; in editResize()
75 LOG_ALWAYS_FATAL_IF((newSize >= (SIZE_MAX - sizeof(SharedBuffer))), in editResize()
76 "Invalid buffer size %zu", newSize); in editResize()
78 buf = (SharedBuffer*)realloc(buf, sizeof(SharedBuffer) + newSize); in editResize()
80 buf->mSize = newSize; in editResize()
84 SharedBuffer* sb = alloc(newSize); in editResize()
87 memcpy(sb->data(), data(), newSize < mySize ? newSize : mySize); in editResize()
DString16.cpp305 void* String16::editResize(size_t newSize) { in editResize() argument
309 if (newSize < copySize) { in editResize()
310 copySize = newSize; in editResize()
312 buf = static_cast<SharedBuffer*>(alloc(newSize)); in editResize()
317 buf = SharedBuffer::bufferFromData(mString)->editResize(newSize); in editResize()
/system/chre/util/include/chre/util/
Dfixed_size_vector_impl.h197 void FixedSizeVector<ElementType, kCapacity>::resize(size_t newSize) { in resize() argument
198 CHRE_ASSERT(newSize <= kCapacity); in resize()
199 if (newSize > kCapacity) { in resize()
200 newSize = kCapacity; in resize()
203 if (newSize > size()) { in resize()
204 for (size_t i = size(); i < newSize; i++) { in resize()
208 for (size_t i = newSize; i < size(); i++) { in resize()
212 mSize = newSize; in resize()
Dfixed_size_vector.h175 void resize(size_t newSize);
Ddynamic_vector_impl.h205 bool DynamicVector<ElementType>::resize(size_type newSize) { in resize() argument
207 while (mSize > newSize) { in resize()
212 while (success && mSize < newSize) { in resize()
Ddynamic_vector.h197 bool resize(size_type newSize);
/system/chre/chpp/include/chpp/
Dmemory.h61 void *chppRealloc(void *oldPtr, const size_t newSize, const size_t oldSize);
/system/libhwbinder/
DBufferedTextOutput.cpp57 size_t newSize = ((len+bufferPos)*3)/2; in append() local
58 void* b = realloc(buffer, newSize); in append()
61 bufferSize = newSize; in append()
DParcel.cpp682 size_t newSize = ((mObjectsSize+2)*3)/2; in writeObject() local
683 if (newSize > SIZE_MAX / sizeof(binder_size_t)) return NO_MEMORY; // overflow in writeObject()
684 binder_size_t* objects = (binder_size_t*)realloc(mObjects, newSize*sizeof(binder_size_t)); in writeObject()
687 mObjectsCapacity = newSize; in writeObject()
1749 size_t newSize = ((mDataSize+len)*3)/2; in growData() local
1750 return continueWrite(newSize); in growData()