Comments (1)
After some advice from the Rust Discord, the code still has issues:
stuffer_shack-rs/src/unchecked_cast.rs
Lines 51 to 56 in a6410cd
- Unaligned access must be done through
ptr::read_unaligned
& similar. It is probably necessary to implement #14 and in the constructor ensure that the chosen alignment is divisible bymem::align_of::<RecordHeader>
when offset by the length - There must not exist any (even temporary) aliased references to mutable memory at the same time, like there is with
slice
anditem
in the mutable version of the function. Better to do pointer math instead. - A check for the enforced alignment should also be done, as the page boundary needs to be divisible by it - as that's the alignment that will be returned by mmap usually.
Volatile itself does not seem to be an issues, as it is mainly concerned about ensuring that multiple repeated writes to a location are not reordered or omitted, as would be the case for an IO device.
from stuffer_shack-rs.
Related Issues (20)
- Make `read` and `write` us a generic type
- Configurable `mmap` size
- Re-examine close of backing file
- A torture-test suite needs to be added.
- The module documentation needs to be greatly improved.
- Single-write transaction support
- Reading-while-writing
- Parallel write support
- Endianness conversion
- Deletion support
- Alignment support
- Persistent index
- Deduplication support
- Builder pattern
- Document pattern of using a static instance map
- Read transactions
- Read-only mode for parallel access
- Allow for using pre-hashed keys
- Space reclamation
- Delta compression
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stuffer_shack-rs.