[base] Implement over-reservation in OS::Allocate on Fuchsia [v8/v8 : main]

0 views
Skip to first unread message

Anton Bikineev (Gerrit)

unread,
Jan 29, 2026, 1:20:41 PM (9 days ago) Jan 29
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-m...@googlegroups.com, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Anton Bikineev voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I319452e7779826557d208507fec8ee33a6ad0fb4
Gerrit-Change-Number: 7532359
Gerrit-PatchSet: 4
Gerrit-Owner: Anton Bikineev <biki...@chromium.org>
Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-CC: Wez <w...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Thu, 29 Jan 2026 18:20:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jan 29, 2026, 2:05:21 PM (9 days ago) Jan 29
to Anton Bikineev, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-m...@googlegroups.com, v8-re...@googlegroups.com
Attention needed from Anton Bikineev

Michael Lippautz voted and added 1 comment

Votes added by Michael Lippautz

Code-Review+1

1 comment

File src/base/platform/platform-fuchsia.cc
Line 149, Patchset 4 (Latest): size_t trim_length, size_t alignment) {
Michael Lippautz . unresolved

`target_length`?

Open in Gerrit

Related details

Attention is currently required from:
  • Anton Bikineev
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I319452e7779826557d208507fec8ee33a6ad0fb4
Gerrit-Change-Number: 7532359
Gerrit-PatchSet: 4
Gerrit-Owner: Anton Bikineev <biki...@chromium.org>
Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-CC: Wez <w...@chromium.org>
Gerrit-Attention: Anton Bikineev <biki...@chromium.org>
Gerrit-Comment-Date: Thu, 29 Jan 2026 19:05:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Anton Bikineev (Gerrit)

unread,
Jan 29, 2026, 5:16:40 PM (9 days ago) Jan 29
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-m...@googlegroups.com, v8-re...@googlegroups.com

Anton Bikineev voted and added 2 comments

Votes added by Anton Bikineev

Commit-Queue+2

2 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Anton Bikineev . resolved

Thanks!

File src/base/platform/platform-fuchsia.cc
Line 149, Patchset 4: size_t trim_length, size_t alignment) {
Michael Lippautz . resolved

`target_length`?

Anton Bikineev

Done, thanks

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I319452e7779826557d208507fec8ee33a6ad0fb4
    Gerrit-Change-Number: 7532359
    Gerrit-PatchSet: 5
    Gerrit-Owner: Anton Bikineev <biki...@chromium.org>
    Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Wez <w...@chromium.org>
    Gerrit-Comment-Date: Thu, 29 Jan 2026 22:16:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
    satisfied_requirement
    open
    diffy

    V8 LUCI CQ (Gerrit)

    unread,
    Jan 29, 2026, 7:27:36 PM (9 days ago) Jan 29
    to Anton Bikineev, Michael Lippautz, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-m...@googlegroups.com, v8-re...@googlegroups.com

    V8 LUCI CQ submitted the change with unreviewed changes

    Unreviewed changes

    4 is the latest approved patch-set.
    The change was submitted with unreviewed changes in the following files:

    ```
    The name of the file: src/base/platform/platform-fuchsia.cc
    Insertions: 3, Deletions: 3.

    @@ -146,12 +146,12 @@
    }

    void* TrimMapping(const zx::vmar& vmar, void* base_address, size_t base_length,
    - size_t trim_length, size_t alignment) {
    + size_t target_length, size_t alignment) {
    uintptr_t base = reinterpret_cast<uintptr_t>(base_address);
    uintptr_t new_base = (base + alignment - 1) & ~(alignment - 1);
    DCHECK_GE(new_base, base);
    size_t pre_slack = new_base - base;
    - size_t post_slack = base_length - pre_slack - trim_length;
    + size_t post_slack = base_length - pre_slack - target_length;
    DCHECK_LE(pre_slack, base_length);
    DCHECK_LE(post_slack, base_length);

    @@ -159,7 +159,7 @@
    vmar.unmap(base, pre_slack);
    }
    if (post_slack) {
    - vmar.unmap(new_base + trim_length, post_slack);
    + vmar.unmap(new_base + target_length, post_slack);
    }
    return reinterpret_cast<void*>(new_base);
    }
    ```

    Change information

    Commit message:
    [base] Implement over-reservation in OS::Allocate on Fuchsia

    This CL implements over-reservation logic in CreateAndMapVmo (used by
    OS::Allocate) to support memory allocations with alignment larger than
    4GB (e.g. 32GB for CppGC Cage). Fuchsia's VMAR mapping does not support
    alignment > 4GB natively. We overallocate (size + alignment), map it,
    find the aligned address, and unmap the head and tail.
    Bug: 454026468
    Change-Id: I319452e7779826557d208507fec8ee33a6ad0fb4
    Commit-Queue: Anton Bikineev <biki...@chromium.org>
    Reviewed-by: Michael Lippautz <mlip...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#104990}
    Files:
    • M src/base/platform/platform-fuchsia.cc
    • M src/heap/cppgc/caged-heap.cc
    Change size: M
    Delta: 2 files changed, 52 insertions(+), 7 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Michael Lippautz
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I319452e7779826557d208507fec8ee33a6ad0fb4
    Gerrit-Change-Number: 7532359
    Gerrit-PatchSet: 6
    Gerrit-Owner: Anton Bikineev <biki...@chromium.org>
    Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Wez <w...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages