Skip to content

Fix bug: Set version of newly allocated slot to 1 instead of 0 #15

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

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

rongma7
Copy link
Contributor

@rongma7 rongma7 commented Dec 27, 2024

This PR addresses a bug where the version of the newly allocated slot was incorrectly set to 0. Since unallocated slots are calculated with a version of 0, the initial allocation should set the version to 1 at the time of allocation to maintain consistency. To enhance clarity, a new constant ALLOC_START_VERSION is introduced.


This change is Reviewable

@rongma7 rongma7 requested a review from ChenxingLi December 27, 2024 02:38
Copy link
Contributor

@ChenxingLi ChenxingLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @rongma7)

@rongma7 rongma7 merged commit 956811f into master Dec 27, 2024
2 checks passed
@rongma7 rongma7 deleted the alloc_start_version branch December 30, 2024 09:32
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