Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dfranke
on Oct 1, 2021
|
parent
|
context
|
favorite
| on:
Freqfs: In-memory filesystem cache for Rust
That's what mmap is for.
haydnv
on Oct 1, 2021
[–]
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
on Oct 1, 2021
|
parent
|
next
[–]
Which OSes does this run on that doesn’t have some kind of mmap operation?
haydnv
on Oct 1, 2021
|
root
|
parent
|
next
[–]
It should work on Windows (because tokio::fs works on Windows) although I have not personally tested this
julian37
on Oct 1, 2021
|
root
|
parent
|
next
[–]
You can do mmap on Windows, eg.
https://github.com/danburkert/memmap-rs
gpderetta
on Oct 1, 2021
|
parent
|
prev
[–]
mmaps for read, explicit API for writing, a-la LMDB. Buggy readers can read inconsistent data but cannot corrupt the os.
otterley
on Oct 1, 2021
|
root
|
parent
[–]
Corrupt the OS? How might that happen?
gpderetta
on Oct 1, 2021
|
root
|
parent
[–]
Sorry, I meant the DB!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: