Split PartitionAlloc headers into internal ones and public ones [chromium/src : main]

0 views
Skip to first unread message

Takashi Sakamoto (Gerrit)

unread,
Apr 28, 2026, 3:58:28 AM (13 days ago) Apr 28
to Keishi Hattori, Sergei Glazunov, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Kentaro Hara, jessemcke...@google.com, fdoray...@chromium.org, roblia...@chromium.org, glazuno...@chromium.org, gab+...@chromium.org, scheduler...@chromium.org, mpdento...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
Attention needed from Keishi Hattori and Sergei Glazunov

Takashi Sakamoto added 4 comments

Patchset-level comments
File-level comment, Patchset 13 (Latest):
Takashi Sakamoto . resolved

Would you review this CL?

I would like to minimize public inline methods of PartitionAlloc. So we can update PartitionAlloc easier (pdfium and so on... will not directly use inside-PartitionAlloc.)

File base/allocator/partition_allocator/src/partition_alloc/internal/partition_address_space_internal.h
Line 100, Patchset 2:PA_ALWAYS_INLINE size_t PartitionAddressSpace::GetZeroSegmentSize() {
Takashi Sakamoto . unresolved

Temporaly move `GetZeroSegmentSize()` into `_internal.h`, because only partition_alloc_unittests invokes it. If some code outside of PA needs it, the method will be moved `partition_address_space.h` (and `PA_NOINLINE`?)

File base/allocator/partition_allocator/src/partition_alloc/partition_root.h
Line 485, Patchset 2: PA_NOINLINE PA_MALLOC_FN void* AllocInline(size_t requested_size,
Takashi Sakamoto . unresolved

Temporaly I made `AllocInline` not an inline method. After I updated all callers outside of PartitionAlloc (i.e. they will use `Alloc` instead), I will make `AllocInline` inline (but private) again.

File components/gwp_asan/client/extreme_lightweight_detector_quarantine.cc
Line 8, Patchset 2:#include "partition_alloc/internal_allocator.h"
Takashi Sakamoto . unresolved

The `nogncheck` will be fixed later. I'm planning to add `extreme_lightweight_detector_quarantine_support.{h,cc}` to `//base/allocator/partition_allocator/src/partition_alloc` and to make this code depend on the `support` library.

Open in Gerrit

Related details

Attention is currently required from:
  • Keishi Hattori
  • Sergei Glazunov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I3481802fd95e229b1e287dabd67b4e2490d763e1
Gerrit-Change-Number: 7795856
Gerrit-PatchSet: 13
Gerrit-Owner: Takashi Sakamoto <ta...@google.com>
Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
Gerrit-Reviewer: Sergei Glazunov <glaz...@google.com>
Gerrit-Reviewer: Takashi Sakamoto <ta...@google.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Keishi Hattori <kei...@chromium.org>
Gerrit-Attention: Sergei Glazunov <glaz...@google.com>
Gerrit-Comment-Date: Tue, 28 Apr 2026 07:58:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Keishi Hattori (Gerrit)

unread,
Apr 30, 2026, 1:02:57 AM (11 days ago) Apr 30
to Takashi Sakamoto, Sergei Glazunov, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Kentaro Hara, jessemcke...@google.com, fdoray...@chromium.org, roblia...@chromium.org, glazuno...@chromium.org, gab+...@chromium.org, scheduler...@chromium.org, mpdento...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
Attention needed from Sergei Glazunov and Takashi Sakamoto

Keishi Hattori voted and added 4 comments

Votes added by Keishi Hattori

Code-Review+1

4 comments

Patchset-level comments
Keishi Hattori . resolved

LGTM

I am not sure how it will affect performance but I guess we can try.

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h
Line 80, Patchset 13 (Latest):#if 1
Keishi Hattori . unresolved

remove?

File base/allocator/partition_allocator/src/partition_alloc/partition_root.h
Line 516, Patchset 13 (Latest): // After make all callers depend on Free<flags>() instead of
Keishi Hattori . unresolved

nit: making

File base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
Line 17, Patchset 13 (Latest):// #include "partition_alloc/internal/partition_root_internal.h"
Keishi Hattori . unresolved

remove?

Open in Gerrit

Related details

Attention is currently required from:
  • Sergei Glazunov
  • Takashi Sakamoto
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3481802fd95e229b1e287dabd67b4e2490d763e1
    Gerrit-Change-Number: 7795856
    Gerrit-PatchSet: 13
    Gerrit-Owner: Takashi Sakamoto <ta...@google.com>
    Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
    Gerrit-Reviewer: Sergei Glazunov <glaz...@google.com>
    Gerrit-Reviewer: Takashi Sakamoto <ta...@google.com>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Takashi Sakamoto <ta...@google.com>
    Gerrit-Attention: Sergei Glazunov <glaz...@google.com>
    Gerrit-Comment-Date: Thu, 30 Apr 2026 05:02:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Takashi Sakamoto (Gerrit)

    unread,
    Apr 30, 2026, 2:51:44 AM (11 days ago) Apr 30
    to Keishi Hattori, Sergei Glazunov, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Kentaro Hara, jessemcke...@google.com, fdoray...@chromium.org, roblia...@chromium.org, glazuno...@chromium.org, gab+...@chromium.org, scheduler...@chromium.org, mpdento...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
    Attention needed from Keishi Hattori and Sergei Glazunov

    Takashi Sakamoto added 4 comments

    Patchset-level comments
    File-level comment, Patchset 14 (Latest):
    Takashi Sakamoto . resolved

    Thank you for the review.

    File base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h
    Line 80, Patchset 13:#if 1
    Keishi Hattori . resolved

    remove?

    Takashi Sakamoto

    Done

    File base/allocator/partition_allocator/src/partition_alloc/partition_root.h
    Line 516, Patchset 13: // After make all callers depend on Free<flags>() instead of
    Keishi Hattori . resolved

    nit: making

    Takashi Sakamoto

    Done

    File base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
    Line 17, Patchset 13:// #include "partition_alloc/internal/partition_root_internal.h"
    Keishi Hattori . resolved

    remove?

    Takashi Sakamoto

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keishi Hattori
    • Sergei Glazunov
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • 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: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I3481802fd95e229b1e287dabd67b4e2490d763e1
      Gerrit-Change-Number: 7795856
      Gerrit-PatchSet: 14
      Gerrit-Owner: Takashi Sakamoto <ta...@google.com>
      Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
      Gerrit-Reviewer: Sergei Glazunov <glaz...@google.com>
      Gerrit-Reviewer: Takashi Sakamoto <ta...@google.com>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Attention: Keishi Hattori <kei...@chromium.org>
      Gerrit-Attention: Sergei Glazunov <glaz...@google.com>
      Gerrit-Comment-Date: Thu, 30 Apr 2026 06:51:36 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Keishi Hattori <kei...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Takashi Sakamoto (Gerrit)

      unread,
      May 8, 2026, 3:45:15 AM (3 days ago) May 8
      to Code Review Nudger, Keishi Hattori, Sergei Glazunov, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Kentaro Hara, gavinp...@chromium.org, jessemcke...@google.com, fdoray...@chromium.org, roblia...@chromium.org, glazuno...@chromium.org, gab+...@chromium.org, scheduler...@chromium.org, mpdento...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
      Attention needed from Keishi Hattori and Sergei Glazunov

      Takashi Sakamoto added 1 comment

      Patchset-level comments
      File-level comment, Patchset 15 (Latest):
      Takashi Sakamoto . resolved

      glazunov@, would you review //components/gwp_asan/ changes?
      I modified `#include`-s.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Keishi Hattori
      • Sergei Glazunov
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • 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: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I3481802fd95e229b1e287dabd67b4e2490d763e1
      Gerrit-Change-Number: 7795856
      Gerrit-PatchSet: 15
      Gerrit-Owner: Takashi Sakamoto <ta...@google.com>
      Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
      Gerrit-Reviewer: Sergei Glazunov <glaz...@google.com>
      Gerrit-Reviewer: Takashi Sakamoto <ta...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Attention: Keishi Hattori <kei...@chromium.org>
      Gerrit-Attention: Sergei Glazunov <glaz...@google.com>
      Gerrit-Comment-Date: Fri, 08 May 2026 07:45:10 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Takashi Sakamoto (Gerrit)

      unread,
      May 8, 2026, 3:49:16 AM (3 days ago) May 8
      to Lei Zhang, Code Review Nudger, Keishi Hattori, Sergei Glazunov, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Kentaro Hara, gavinp...@chromium.org, jessemcke...@google.com, fdoray...@chromium.org, roblia...@chromium.org, glazuno...@chromium.org, gab+...@chromium.org, scheduler...@chromium.org, mpdento...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
      Attention needed from Keishi Hattori, Lei Zhang and Sergei Glazunov

      Takashi Sakamoto added 1 comment

      Patchset-level comments
      Takashi Sakamoto . resolved

      thestig@, would you review //base/memory/safety_checks_unittest.cc change?
      I need to add `1 line: #include "partition_alloc/internal/partition_root_internal.h"` to `safety_checks_unittest.cc`.
      I will fix `// nogncheck` later.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Keishi Hattori
      • Lei Zhang
      • Sergei Glazunov
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • 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: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I3481802fd95e229b1e287dabd67b4e2490d763e1
      Gerrit-Change-Number: 7795856
      Gerrit-PatchSet: 15
      Gerrit-Owner: Takashi Sakamoto <ta...@google.com>
      Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
      Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
      Gerrit-Reviewer: Sergei Glazunov <glaz...@google.com>
      Gerrit-Reviewer: Takashi Sakamoto <ta...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Attention: Lei Zhang <the...@chromium.org>
      Gerrit-Attention: Keishi Hattori <kei...@chromium.org>
      Gerrit-Attention: Sergei Glazunov <glaz...@google.com>
      Gerrit-Comment-Date: Fri, 08 May 2026 07:49:08 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sergei Glazunov (Gerrit)

      unread,
      May 8, 2026, 4:02:06 AM (3 days ago) May 8
      to Takashi Sakamoto, Lei Zhang, Code Review Nudger, Keishi Hattori, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Kentaro Hara, gavinp...@chromium.org, jessemcke...@google.com, fdoray...@chromium.org, roblia...@chromium.org, glazuno...@chromium.org, gab+...@chromium.org, scheduler...@chromium.org, mpdento...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
      Attention needed from Keishi Hattori, Lei Zhang and Takashi Sakamoto

      Sergei Glazunov voted and added 1 comment

      Votes added by Sergei Glazunov

      Code-Review+1

      1 comment

      File components/gwp_asan/client/extreme_lightweight_detector_quarantine.cc
      Line 8, Patchset 2:#include "partition_alloc/internal_allocator.h"
      Takashi Sakamoto . resolved

      The `nogncheck` will be fixed later. I'm planning to add `extreme_lightweight_detector_quarantine_support.{h,cc}` to `//base/allocator/partition_allocator/src/partition_alloc` and to make this code depend on the `support` library.

      Sergei Glazunov

      Acknowledged

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Keishi Hattori
      • Lei Zhang
      • Takashi Sakamoto
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I3481802fd95e229b1e287dabd67b4e2490d763e1
        Gerrit-Change-Number: 7795856
        Gerrit-PatchSet: 15
        Gerrit-Owner: Takashi Sakamoto <ta...@google.com>
        Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
        Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
        Gerrit-Reviewer: Sergei Glazunov <glaz...@google.com>
        Gerrit-Reviewer: Takashi Sakamoto <ta...@google.com>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-Attention: Lei Zhang <the...@chromium.org>
        Gerrit-Attention: Takashi Sakamoto <ta...@google.com>
        Gerrit-Attention: Keishi Hattori <kei...@chromium.org>
        Gerrit-Comment-Date: Fri, 08 May 2026 08:01:51 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Takashi Sakamoto <ta...@google.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Lei Zhang (Gerrit)

        unread,
        May 8, 2026, 11:53:13 AM (3 days ago) May 8
        to Takashi Sakamoto, Lei Zhang, Sergei Glazunov, Code Review Nudger, Keishi Hattori, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Kentaro Hara, gavinp...@chromium.org, jessemcke...@google.com, fdoray...@chromium.org, roblia...@chromium.org, glazuno...@chromium.org, gab+...@chromium.org, scheduler...@chromium.org, mpdento...@chromium.org, bartek...@chromium.org, lize...@chromium.org, lizeb...@chromium.org, wfh+...@chromium.org
        Attention needed from Keishi Hattori and Takashi Sakamoto

        Lei Zhang voted and added 1 comment

        Votes added by Lei Zhang

        Code-Review+1

        1 comment

        File base/memory/safety_checks_unittest.cc
        Line 10, Patchset 15 (Latest):#include "partition_alloc/internal/partition_root_internal.h" // nogncheck
        Lei Zhang . unresolved

        Presumably this will get fixed at some point, so external code, even if it's just a test, don't reach into internals?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Keishi Hattori
        • Takashi Sakamoto
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • 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: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I3481802fd95e229b1e287dabd67b4e2490d763e1
        Gerrit-Change-Number: 7795856
        Gerrit-PatchSet: 15
        Gerrit-Owner: Takashi Sakamoto <ta...@google.com>
        Gerrit-Reviewer: Keishi Hattori <kei...@chromium.org>
        Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
        Gerrit-Reviewer: Sergei Glazunov <glaz...@google.com>
        Gerrit-Reviewer: Takashi Sakamoto <ta...@google.com>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-Attention: Takashi Sakamoto <ta...@google.com>
        Gerrit-Attention: Keishi Hattori <kei...@chromium.org>
        Gerrit-Comment-Date: Fri, 08 May 2026 15:53:00 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages