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

Commit 6fcefffc authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "CachedAppOptimizer: Remove use of hardcoded PAGE_SIZE 4096" into...

Merge "Merge "CachedAppOptimizer: Remove use of hardcoded PAGE_SIZE 4096" into main am: 493ff6be am: 745808fc am: bb25444a am: 67d22ba2" into udc-qpr-dev-plus-aosp
parents aa290741 4b7aa7b3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -233,6 +233,7 @@ public:
// process_madvise on failure
int madviseVmasFromBatch(unique_fd& pidfd, VmaBatch& batch, int madviseType,
                         uint64_t* outBytesProcessed) {
    static const size_t kPageSize = getpagesize();
    if (batch.totalVmas == 0 || batch.totalBytes == 0) {
        // No VMAs in Batch, skip.
        *outBytesProcessed = 0;
@@ -258,7 +259,7 @@ int madviseVmasFromBatch(unique_fd& pidfd, VmaBatch& batch, int madviseType,
    } else if (bytesProcessedInSend < batch.totalBytes) {
        // Partially processed the bytes requested
        // skip last page which is where it failed.
        bytesProcessedInSend += PAGE_SIZE;
        bytesProcessedInSend += kPageSize;
    }
    bytesProcessedInSend = consumeBytes(batch, bytesProcessedInSend);