We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The current implementation doesn't seem to do sparse allocation like https://github.com/random-access-storage/random-access-memory.
In short: RandomAccessMemory::buffers should be of type Vec<Option<Vec<u8>>> instead of the current type Vec<Vec<u8>>.
RandomAccessMemory::buffers
Vec<Option<Vec<u8>>>
Vec<Vec<u8>>
I can see two problems with the current implementation:
RandomAccessMemory::write() allocates all pages before page_num unnecessarily. See
RandomAccessMemory::write()
page_num
random-access-memory/src/lib.rs
Line 86 in 957856c
RandomAccessMemory::del() seems to be broken. When removing a page it shifts all following pages thereby corrupting the stored data. Compare
RandomAccessMemory::del()
Line 183 in 957856c
The text was updated successfully, but these errors were encountered:
Should this adopt another of project on datrs that already seems to handle sparse data using Vec<Option<Page>>?
datrs
Vec<Option<Page>>
https://github.com/datrs/memory-pager/blob/8f3f650af47a0044e56b48d6aeb1037a1a0555c5/src/lib.rs#L24
Sorry, something went wrong.
Seems like a good idea. I'm not overly familiar with that project, though.
No branches or pull requests
The current implementation doesn't seem to do sparse allocation like https://github.com/random-access-storage/random-access-memory.
In short:
RandomAccessMemory::buffers
should be of typeVec<Option<Vec<u8>>>
instead of the current typeVec<Vec<u8>>
.I can see two problems with the current implementation:
RandomAccessMemory::write()
allocates all pages beforepage_num
unnecessarily. Seerandom-access-memory/src/lib.rs
Line 86 in 957856c
RandomAccessMemory::del()
seems to be broken. When removing a page it shifts all following pages thereby corrupting the stored data. Comparerandom-access-memory/src/lib.rs
Line 183 in 957856c
The text was updated successfully, but these errors were encountered: