Lines Matching refs:size

251             UTILS_LOGE("Failed to alloc parcel size, dataSize_ = %{public}zu", dataSize_);
273 UTILS_LOGD("CheckOffsets Invalid obj, obj size overflow. objSize:%{public}zu, dataSize:%{public}zu",
360 bool Parcel::WriteDataBytes(const void *data, size_t size)
364 if (memcpy_s(dest, writableBytes, data, size) != EOK) {
367 writeCursor_ += size;
368 dataSize_ += size;
386 bool Parcel::WriteBuffer(const void *data, size_t size)
388 if (data == nullptr || size == 0) {
392 size_t padSize = GetPadSize(size);
393 size_t desireCapacity = size + padSize;
396 if (desireCapacity < size || desireCapacity < padSize) {
401 if (!WriteDataBytes(data, size)) {
411 bool Parcel::WriteBufferAddTerminator(const void *data, size_t size, size_t typeSize)
413 if (data == nullptr || size < typeSize) {
417 size_t padSize = GetPadSize(size);
418 size_t desireCapacity = size + padSize;
421 if (desireCapacity < size || desireCapacity < padSize) {
426 if (!WriteDataBytes(data, size - typeSize)) {
442 bool Parcel::WriteUnpadBuffer(const void *data, size_t size)
444 return WriteBuffer(data, size);
802 bool Parcel::ParseFrom(uintptr_t data, size_t size)
809 dataCapacity_ = size;
810 dataSize_ = size;
1307 void *DefaultAllocator::Alloc(size_t size)
1309 return malloc(size);
1327 if (val.size() > INT_MAX) {
1331 if (!this->WriteInt32(static_cast<int32_t>(val.size()))) {
1341 size_t padSize = this->GetPadSize(val.size() * sizeof(T1));
1352 if (originVal.size() > INT_MAX) {
1356 if (!this->WriteInt32(static_cast<int32_t>(originVal.size()))) {
1367 size_t padSize = this->GetPadSize(originVal.size() * sizeof(Type));
1453 size_t size = static_cast<size_t>(len);
1454 if ((size > readAbleSize) || (size > val->max_size())) {
1455 UTILS_LOGE("Failed to read vector, size = %{public}zu, readAbleSize = %{public}zu", size, readAbleSize);
1458 val->resize(size);
1459 if (val->size() < size) {
1469 size_t padSize = this->GetPadSize(size * sizeof(T));
1487 size_t size = static_cast<size_t>(len);
1488 if ((size > readAbleSize) || (size > val->max_size())) {
1489 UTILS_LOGE("Failed to fixed aligned read vector, size = %{public}zu, readAbleSize = %{public}zu",
1490 size, readAbleSize);
1493 val->resize(size);
1494 if (val->size() < size) {
1498 for (size_t i = 0; i < size; ++i) {
1506 size_t padSize = this->GetPadSize(size * sizeof(Type));
1578 size_t size = static_cast<size_t>(len);
1579 if ((size > readAbleSize) || (val->max_size() < size)) {
1580 UTILS_LOGE("Failed to read string vector, size = %{public}zu, readAbleSize = %{public}zu", size, readAbleSize);
1583 val->resize(size);
1584 if (val->size() < size) {
1607 size_t size = static_cast<size_t>(len);
1608 if ((size > readAbleSize) || (val->max_size() < size)) {
1609 UTILS_LOGE("Failed to read u16string vector, size = %{public}zu, readAbleSize = %{public}zu",
1610 size, readAbleSize);
1614 val->resize(size);
1615 if (val->size() < size) {