Searched refs:newSize (Results 1 – 8 of 8) sorted by relevance
/drivers/hdf_core/framework/tools/hdi-gen/util/ |
D | string_builder.cpp | 122 size_t newSize = (capacity_ == 0) ? 256 : (capacity_ * 2); in Grow() local 123 if (newSize < capacity_ + size) { in Grow() 124 newSize = capacity_ + size; in Grow() 126 if (newSize > StringHelper::maxSize) { in Grow() 127 newSize = StringHelper::maxSize; in Grow() 129 if (newSize <= capacity_) { in Grow() 133 char *newBuffer = reinterpret_cast<char *>(calloc(newSize, 1)); in Grow() 135 Logger::E(TAG, "Fail to malloc %lu bytes memory.", newSize); in Grow() 140 (void)memcpy_s(newBuffer, newSize, buffer_, capacity_); in Grow() 144 capacity_ = newSize; in Grow()
|
/drivers/interface/display/composer/command_pack/ |
D | command_data_packer.h | 190 size_t newSize = writePos_ + writeSize; in Write() local 191 if (newSize > packSize_) { in Write() 196 newSize = (newSize + ALLOC_PAGE_SIZE - 1) & (~(ALLOC_PAGE_SIZE - 1)); in Write() 197 char *newData = new char[newSize]; in Write() 202 if (memcpy_s(newData, newSize, data_, packSize_) != EOK) { in Write() 210 packSize_ = newSize; in Write()
|
/drivers/hdf_core/framework/utils/src/ |
D | osal_message.c | 14 size_t newSize = sizeof(struct HdfMessage) + extendSize; in HdfMessageObtain() local 15 return (struct HdfMessage *)OsalMemCalloc(newSize); in HdfMessageObtain()
|
D | hdf_sbuf_impl_raw.c | 147 uint32_t newSize; in SbufRawImplGrow() local 154 newSize = SbufRawImplGetAlignSize(sbuf->capacity + growSize); in SbufRawImplGrow() 155 if (newSize < sbuf->capacity) { in SbufRawImplGrow() 159 if (newSize > HDF_SBUF_MAX_SIZE) { in SbufRawImplGrow() 164 newData = OsalMemCalloc(newSize); in SbufRawImplGrow() 171 if (memcpy_s(newData, newSize, sbuf->data, sbuf->writePos) != EOK) { in SbufRawImplGrow() 179 sbuf->capacity = newSize; in SbufRawImplGrow()
|
/drivers/hdf_core/framework/core/adapter/syscall/src/ |
D | hdf_syscall_adapter.c | 53 size_t newSize = buffer->readSize; in HdfDevEventGrowReadBuffer() local 55 if (newSize > EVENT_READ_BUFF_MAX) { in HdfDevEventGrowReadBuffer() 60 void *newBuff = OsalMemAlloc(newSize); in HdfDevEventGrowReadBuffer() 62 HDF_LOGE("%s:oom,%d", __func__, (int)newSize); in HdfDevEventGrowReadBuffer() 386 uint32_t newSize = thread->pfdSize + HDF_PFD_GROW_SIZE; in GetValidPfdIndexLocked() local 387 struct pollfd *newPfds = OsalMemCalloc(sizeof(struct pollfd) * newSize); in GetValidPfdIndexLocked() 393 … newPfds, sizeof(struct pollfd) * newSize, thread->pfds, sizeof(struct pollfd) * thread->pfdSize); in GetValidPfdIndexLocked() 396 for (uint32_t i = index; i < newSize; i++) { in GetValidPfdIndexLocked() 402 thread->pfdSize = newSize; in GetValidPfdIndexLocked()
|
/drivers/hdf_core/adapter/uhdf2/ipc/src/ |
D | hdf_sbuf_impl_hipc.cpp | 379 void *Realloc(void *data, size_t newSize) override in Realloc() argument 382 (void)newSize; in Realloc()
|
/drivers/peripheral/usb/ddk/host/src/ |
D | linux_adapter.c | 33 static void *OsAdapterRealloc(void *ptr, size_t oldSize, size_t newSize) in OsAdapterRealloc() argument 35 void *mem = RawUsbMemAlloc(newSize); in OsAdapterRealloc() 42 if (memmove_s(mem, newSize, ptr, oldSize) != EOK) { in OsAdapterRealloc()
|
D | liteos_adapter.c | 51 static void *OsAdapterRealloc(void *ptr, size_t oldSize, size_t newSize) in OsAdapterRealloc() argument 55 mem = RawUsbMemAlloc(newSize); in OsAdapterRealloc() 62 if (memmove_s(mem, newSize, ptr, oldSize) != HDF_SUCCESS) { in OsAdapterRealloc()
|