Lines Matching defs:desired

2485 status_t Parcel::restartWrite(size_t desired)
2487 if (desired > INT32_MAX) {
2495 return continueWrite(desired);
2498 uint8_t* data = (uint8_t*)realloc(mData, desired);
2499 if (!data && desired > mDataCapacity) {
2507 LOG_ALLOC("Parcel %p: restart from %zu to %zu capacity", this, mDataCapacity, desired);
2509 gParcelGlobalAllocSize += desired;
2516 mDataCapacity = desired;
2534 status_t Parcel::continueWrite(size_t desired)
2536 if (desired > INT32_MAX) {
2545 if (desired < mDataSize) {
2546 if (desired == 0) {
2550 if (mObjects[objectsSize-1] < desired)
2559 if (desired == 0) {
2566 uint8_t* data = (uint8_t*)malloc(desired);
2591 memcpy(data, mData, mDataSize < desired ? mDataSize : desired);
2600 LOG_ALLOC("Parcel %p: taking ownership of %zu capacity", this, desired);
2602 gParcelGlobalAllocSize += desired;
2608 mDataSize = (mDataSize < desired) ? mDataSize : desired;
2610 mDataCapacity = desired;
2637 if (desired > mDataCapacity) {
2638 uint8_t* data = (uint8_t*)realloc(mData, desired);
2641 desired);
2643 gParcelGlobalAllocSize += desired;
2647 mDataCapacity = desired;
2648 } else if (desired > mDataCapacity) {
2653 if (mDataSize > desired) {
2654 mDataSize = desired;
2657 if (mDataPos > desired) {
2658 mDataPos = desired;
2665 uint8_t* data = (uint8_t*)malloc(desired);
2673 ALOGE("continueWrite: %zu/%p/%zu/%zu", mDataCapacity, mObjects, mObjectsCapacity, desired);
2676 LOG_ALLOC("Parcel %p: allocating with %zu capacity", this, desired);
2678 gParcelGlobalAllocSize += desired;
2686 mDataCapacity = desired;