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

Immix leaks memeory due to stale line mark state left around #1267

Closed
tianleq opened this issue Jan 28, 2025 · 2 comments
Closed

Immix leaks memeory due to stale line mark state left around #1267

tianleq opened this issue Jan 28, 2025 · 2 comments

Comments

@tianleq
Copy link
Collaborator

tianleq commented Jan 28, 2025

In the current immix implementation, line mark state is cyclic and it is never cleared. We rely on the fact that line mark state value will not be the same between different GCs. However, only 7 bits is reserved for line mark state, which means after 128 GCs, the line mark state would wrap around, causing some stale line mark state incorrectly marking a free line as unavailable.

@tianleq
Copy link
Collaborator Author

tianleq commented Jan 28, 2025

The fix is straightforward, whenever a line is freed, clear the line mark state and bulk clear the line mark state within a block when the block becomes free

@tianleq tianleq closed this as completed Jan 29, 2025
@tianleq
Copy link
Collaborator Author

tianleq commented Jan 29, 2025

Fixed in #1268

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

No branches or pull requests

1 participant