Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opt: Optimize AllocationTracker to be efficient when enabled #3875

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

chakaz
Copy link
Collaborator

@chakaz chakaz commented Oct 6, 2024

Today there's a cost to enabling AllocationTracker, even for rarely used memory bands.

This PR slightly optimizes the "happy path" (i.e. allocations outside the tracked range), and also for the case where we track 100% of the allocations.

Also, add a unit test for this class.

Today there's a cost to enabling AllocationTracker, even for rarely used
memory bands.

This PR slightly optimizes the "happy path" (i.e. allocations outside
the tracked range), and also for the case where we track 100% of the
allocations.

Also, add a unit test for this class.
@chakaz chakaz requested a review from adiholden October 6, 2024 12:39
@chakaz chakaz merged commit 5efc8f1 into main Oct 6, 2024
12 checks passed
@chakaz chakaz deleted the chakaz/alloc-opt branch October 6, 2024 19:00
kostasrim pushed a commit that referenced this pull request Oct 7, 2024
Today there's a cost to enabling AllocationTracker, even for rarely used
memory bands.

This PR slightly optimizes the "happy path" (i.e. allocations outside
the tracked range), and also for the case where we track 100% of the
allocations.

Also, add a unit test for this class.
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.

2 participants