Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dfranke
· 5y ago · 0 comments
That's what mmap is for.
Comments
[–]
haydnv
5y ago
It might be possible to replace freqfs with mmap on a POSIX OS, but a) you would still have to implement your own read-write lock, and b) you would (I think probably?) lose some consistency in behavior across different host operating systems.
[–]
vlovich123
5y ago
Which OSes does this run on that doesn’t have some kind of mmap operation?
[–]
haydnv
5y ago
It should work on Windows (because tokio::fs works on Windows) although I have not personally tested this
[–]
julian37
5y ago
You can do mmap on Windows, eg.
https://github.com/danburkert/memmap-rs
[–]
gpderetta
5y ago
mmaps for read, explicit API for writing, a-la LMDB. Buggy readers can read inconsistent data but cannot corrupt the os.
[–]
otterley
5y ago
Corrupt the OS? How might that happen?
[–]
gpderetta
5y ago
Sorry, I meant the DB!