Skip to content

Commit 1c44d8e

Browse files
yuki3chromeos-ci-prod
authored andcommitted
ELUD: Do not quarantine direct-mapped allocations
Direct-mapped allocations are generally very large and zapping them takes long time and causes browser janks. Plus, they're unmapped when free'ed, so there should be less (or even negative) value to quarantine direct-mapped allocations. c.f. https://crrev.com/c/5952195 Bug: 40944045 Change-Id: I171c53f6476e3840ca6af932becff5bb8b8d42a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5963883 Commit-Queue: Yuki Shiino <yukishiino@chromium.org> Reviewed-by: Takashi Sakamoto <tasak@google.com> Reviewed-by: Sergei Glazunov <glazunov@google.com> Cr-Commit-Position: refs/heads/main@{#1374540} CrOS-Libchrome-Original-Commit: 0edb68d842aa463df2152ac4155bbad17a2ca59e
1 parent 03f6ce7 commit 1c44d8e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

base/allocator/partition_allocator/src/partition_alloc/partition_root.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,13 @@ struct alignas(64) PA_COMPONENT_EXPORT(PARTITION_ALLOC) PartitionRoot {
752752
internal::DirectMapAllocationGranularity());
753753
}
754754

755+
PA_ALWAYS_INLINE bool IsDirectMapped(
756+
partition_alloc::internal::SlotSpanMetadata<
757+
partition_alloc::internal::MetadataKind::kReadOnly>* slot_span)
758+
const {
759+
return IsDirectMappedBucket(slot_span->bucket);
760+
}
761+
755762
PA_ALWAYS_INLINE size_t AdjustSize0IfNeeded(size_t size) const {
756763
// There are known cases where allowing size 0 would lead to problems:
757764
// 1. If extras are present only before allocation (e.g. in-slot metadata),

0 commit comments

Comments
 (0)