Lines Matching refs:desired
1540 status_t Parcel::restartWrite(size_t desired)
1544 return continueWrite(desired);
1547 uint8_t* data = (uint8_t*)realloc(mData, desired);
1548 if (!data && desired > mDataCapacity) {
1556 LOG_ALLOC("Parcel %p: restart from %zu to %zu capacity", this, mDataCapacity, desired);
1558 gParcelGlobalAllocSize += desired;
1562 mDataCapacity = desired;
1580 status_t Parcel::continueWrite(size_t desired)
1585 if (desired < mDataSize) {
1586 if (desired == 0) {
1590 if (mObjects[objectsSize-1] < desired)
1599 if (desired == 0) {
1606 uint8_t* data = (uint8_t*)malloc(desired);
1631 memcpy(data, mData, mDataSize < desired ? mDataSize : desired);
1640 LOG_ALLOC("Parcel %p: taking ownership of %zu capacity", this, desired);
1642 gParcelGlobalAllocSize += desired;
1648 mDataSize = (mDataSize < desired) ? mDataSize : desired;
1650 mDataCapacity = desired;
1677 if (desired > mDataCapacity) {
1678 uint8_t* data = (uint8_t*)realloc(mData, desired);
1681 desired);
1683 gParcelGlobalAllocSize += desired;
1687 mDataCapacity = desired;
1688 } else if (desired > mDataCapacity) {
1693 if (mDataSize > desired) {
1694 mDataSize = desired;
1697 if (mDataPos > desired) {
1698 mDataPos = desired;
1705 uint8_t* data = (uint8_t*)malloc(desired);
1713 ALOGE("continueWrite: %zu/%p/%zu/%zu", mDataCapacity, mObjects, mObjectsCapacity, desired);
1716 LOG_ALLOC("Parcel %p: allocating with %zu capacity", this, desired);
1718 gParcelGlobalAllocSize += desired;
1726 mDataCapacity = desired;