Searched refs:newSize (Results 1 - 8 of 8) sorted by relevance
/drivers/hdf_core/framework/tools/hdi-gen/util/ |
H A D | string_builder.cpp | 134 size_t newSize = (capacity_ == 0) ? 256 : (capacity_ * 2); in Grow() local 135 if (newSize < capacity_ + size) { in Grow() 136 newSize = capacity_ + size; in Grow() 138 if (newSize > StringHelper::maxSize) { in Grow() 139 newSize = StringHelper::maxSize; in Grow() 141 if (newSize <= capacity_) { in Grow() 145 char *newBuffer = reinterpret_cast<char *>(calloc(newSize, 1)); in Grow() 147 Logger::E(TAG, "Fail to malloc %lu bytes memory.", newSize); in Grow() 152 int ret = memcpy_s(newBuffer, newSize, buffer_, capacity_); in Grow() 161 capacity_ = newSize; in Grow() [all...] |
/drivers/interface/display/composer/command_pack/ |
H A D | command_data_packer.h | 203 size_t newSize = writePos_ + writeSize; 204 if (newSize > packSize_) { 209 newSize = (newSize + ALLOC_PAGE_SIZE - 1) & (~(ALLOC_PAGE_SIZE - 1)); 210 char *newData = new char[newSize]; 215 if (memcpy_s(newData, newSize, data_, packSize_) != EOK) { 223 packSize_ = newSize;
|
/drivers/hdf_core/framework/utils/src/ |
H A D | osal_message.c | 14 size_t newSize = sizeof(struct HdfMessage) + extendSize; in HdfMessageObtain() local 15 return (struct HdfMessage *)OsalMemCalloc(newSize); in HdfMessageObtain()
|
H A D | hdf_sbuf_impl_raw.c | 151 uint32_t newSize; in SbufRawImplGrow() local 158 newSize = SbufRawImplGetAlignSize(sbuf->capacity + growSize); in SbufRawImplGrow() 159 if (newSize < sbuf->capacity) { in SbufRawImplGrow() 163 if (newSize > HDF_SBUF_MAX_SIZE) { in SbufRawImplGrow() 168 newData = OsalMemCalloc(newSize); in SbufRawImplGrow() 175 if (memcpy_s(newData, newSize, sbuf->data, sbuf->writePos) != EOK) { in SbufRawImplGrow() 183 sbuf->capacity = newSize; in SbufRawImplGrow()
|
/drivers/hdf_core/framework/core/adapter/syscall/src/ |
H A D | hdf_syscall_adapter.c | 54 size_t newSize = buffer->readSize; in HdfDevEventGrowReadBuffer() local 56 if (newSize > EVENT_READ_BUFF_MAX) { in HdfDevEventGrowReadBuffer() 61 void *newBuff = OsalMemAlloc(newSize); in HdfDevEventGrowReadBuffer() 63 HDF_LOGE("%{public}s:oom,%{public}d", __func__, (int)newSize); in HdfDevEventGrowReadBuffer() 391 uint32_t newSize = thread->pfdSize + HDF_PFD_GROW_SIZE; in GetValidPfdIndexLocked() local 392 struct pollfd *newPfds = OsalMemCalloc(sizeof(struct pollfd) * newSize); in GetValidPfdIndexLocked() 398 newPfds, sizeof(struct pollfd) * newSize, thread->pfds, sizeof(struct pollfd) * thread->pfdSize); in GetValidPfdIndexLocked() 401 for (uint32_t i = index; i < newSize; i++) { in GetValidPfdIndexLocked() 407 thread->pfdSize = newSize; in GetValidPfdIndexLocked()
|
/drivers/hdf_core/adapter/uhdf2/ipc/src/ |
H A D | hdf_sbuf_impl_hipc.cpp | 379 void *Realloc(void *data, size_t newSize) override 382 (void)newSize; variable
|
/drivers/peripheral/usb/ddk/host/src/ |
H A D | linux_adapter.c | 34 static void *OsAdapterRealloc(void *ptr, size_t oldSize, size_t newSize) in OsAdapterRealloc() argument 36 void *mem = RawUsbMemAlloc(newSize); in OsAdapterRealloc() 43 if (memmove_s(mem, newSize, ptr, oldSize) != EOK) { in OsAdapterRealloc()
|
H A D | liteos_adapter.c | 52 static void *OsAdapterRealloc(void *ptr, size_t oldSize, size_t newSize) in OsAdapterRealloc() argument 56 mem = RawUsbMemAlloc(newSize); in OsAdapterRealloc() 63 if (memmove_s(mem, newSize, ptr, oldSize) != HDF_SUCCESS) { in OsAdapterRealloc()
|
Completed in 10 milliseconds