Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9547da03 authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Merge "Fix allocation count" am: b25116f7

am: 4b5d182f

* commit '4b5d182f':
  Fix allocation count
parents 491efee8 4b5d182f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1987,6 +1987,9 @@ status_t Parcel::restartWrite(size_t desired)
        pthread_mutex_lock(&gParcelGlobalAllocSizeLock);
        gParcelGlobalAllocSize += desired;
        gParcelGlobalAllocSize -= mDataCapacity;
        if (!mData) {
            gParcelGlobalAllocCount++;
        }
        pthread_mutex_unlock(&gParcelGlobalAllocSizeLock);
        mData = data;
        mDataCapacity = desired;
@@ -2118,7 +2121,6 @@ status_t Parcel::continueWrite(size_t desired)
                pthread_mutex_lock(&gParcelGlobalAllocSizeLock);
                gParcelGlobalAllocSize += desired;
                gParcelGlobalAllocSize -= mDataCapacity;
                gParcelGlobalAllocCount++;
                pthread_mutex_unlock(&gParcelGlobalAllocSizeLock);
                mData = data;
                mDataCapacity = desired;