Size of the DSTORAGE_REQUEST_OPTIONS
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by locating the DSTORAGE_REQUEST_OPTIONS definition in the DirectStorage API and reproduce its size with MSVC, focusing on the mixed UINT8 and UINT64 bitfields and resulting alignment. Compare the observed layout with the intended ABI and record whether the 16-byte size is designed or needs correction for Rust interoperability.
Written by the indexing model from the issue text.
Description
While porting the DirectStorage API to Rust, we found the following curriosity and would like to as if it's working as designed:
The DSTORAGE_REQUEST_OPTIONS is defines as a bitfield and it seems that the design goal was that all fields are packed into a single unsigned 64 bit integer field.
But the current implementation is not of byte size 8, but of size 16, since MSVC is only packing fields with the same type into the same backing field. Since DSTORAGE_COMPRESSION_FORMAT is an UINT8 and not an UINT64 like the other fields, it will be stored by MSVC into it's own backing field. Allignment and padding then will grow the size of DSTORAGE_REQUEST_SOURCE_TYPE to 16 bytes.
- Dominant language
- C++
- Stars
- 897
- Forks
- 111
- Avg merge
- 13h 58m
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DirectStorage
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
microsoft/DirectStorage#137 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/DirectStorage#101 ·
-
can't compile? Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
microsoft/DirectStorage#58 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
microsoft/DirectStorage#56 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/DirectStorage#52 · 7 comments ·
All issues in microsoft/DirectStorage
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100