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

add "modified" bit for interupt support #2

Open
vitiral opened this issue Jun 15, 2017 · 0 comments
Open

add "modified" bit for interupt support #2

vitiral opened this issue Jun 15, 2017 · 0 comments

Comments

@vitiral
Copy link
Owner

vitiral commented Jun 15, 2017

I had a eureka moment.

This libary could be made to work with volatile data very easily:

  • before moving data during defrag, set a modified bit to 0
  • whenver data is locked, this bit is set to 1
  • every so often, check the bit. If it is 1, start again from the beginning.
  • when the data is finished moving atomically and simultaniously check that modified=0 and then set the pointer to it's new location.

Another change is that data can ONLY be moved if its tail will will not overlap with its head (data can never be changed during a move). This is a minor restriction, but a fine one IMO.

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