Skip to content

De-std::atomic Span::allocated_.#348

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_945244330
Jul 14, 2026
Merged

De-std::atomic Span::allocated_.#348
copybara-service[bot] merged 1 commit into
masterfrom
test_945244330

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jul 13, 2026

Copy link
Copy Markdown

De-std::atomic Span::allocated_.

This prevents the compiler from merging redundant load/store operations. This
is especially pronounced on InsertRange, while RemoveRange appears to have
enough memory pressure that we will need to spill anyways.

Since the turndown of the fragmentation profile, we no longer need to keep Span::Allocated() safe for accessing across threads so an ordinary integer will suffice.

@copybara-service copybara-service Bot force-pushed the test_945244330 branch 9 times, most recently from ae59adc to 75ba14c Compare July 14, 2026 15:00
This prevents the compiler from merging redundant load/store operations.  This
is especially pronounced on InsertRange, while RemoveRange appears to have
enough memory pressure that we will need to spill anyways.

Since the turndown of the fragmentation profile, we no longer need to keep `Span::Allocated()` safe for accessing across threads so an ordinary integer will suffice.

PiperOrigin-RevId: 947690429
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.

1 participant