Skip to content

Use a common interface to check for cold memory. - #1984

Draft
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1030416611
Draft

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1030416611

Conversation

@copybara-service

Copy link
Copy Markdown

Use a common interface to check for cold memory.

Replace direct comparisons against MemoryTag::kSampledOrCold with
IsSampledOrColdMemory() and a shared mask (kColdTagOrBadDeallocationMask), so
the checks cover both cold tags, kSampledOrCold and kSampledOrColdP1.

NFC: only sampled allocations are tagged kSampledOrColdP1 today, and they
already take the slow free path.

Replace direct comparisons against MemoryTag::kSampledOrCold with
IsSampledOrColdMemory() and a shared mask (kColdTagOrBadDeallocationMask), so
the checks cover both cold tags, kSampledOrCold and kSampledOrColdP1.

NFC: only sampled allocations are tagged kSampledOrColdP1 today, and they
already take the slow free path.
PiperOrigin-RevId: 1030416611
@google-cla

google-cla Bot commented Dec 2, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants