Skip to content

Commit 754a582

Browse files
v-gogtecopybara-github
authored andcommitted
Exclude infrequent allocation hint from hugepage configuration.
PiperOrigin-RevId: 817212220 Change-Id: Ifcc454a8f7f5049430eed9b3de45a7c3adf73c64
1 parent 95322f7 commit 754a582

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tcmalloc/internal/system_allocator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,10 @@ std::pair<void*, size_t> SystemAllocator<Topology>::MmapRegion::Alloc(
365365
// For cold regions (kInfrequentAccess) and sampled regions
366366
// (kInfrequentAllocation), we want as granular of access telemetry as
367367
// possible; this hint means we can get 4kiB granularity instead of 2MiB.
368-
if (((hint_ == AddressRegionFactory::UsageHint::kInfrequentAccess ||
369-
hint_ == AddressRegionFactory::UsageHint::kInfrequentAllocation) &&
368+
if ((hint_ == AddressRegionFactory::UsageHint::kInfrequentAccess &&
370369
!IsExperimentActive(
371370
Experiment::TEST_ONLY_TCMALLOC_MADV_COLD_HUGEPAGE)) ||
371+
hint_ == AddressRegionFactory::UsageHint::kInfrequentAllocation ||
372372
system_allocator_internal::preferential_collapse()) {
373373
// This is only advisory, so ignore the error.
374374
ErrnoRestorer errno_restorer;

0 commit comments

Comments
 (0)