Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, MLockedSizedBytes was defined in terms of PinnedSizedBytes, but never actually used as such - the memory it handles doesn't actually hold a PinnedSizedBytes object, it's just a blob of raw memory, not an actual Haskell value in any capacity, and you're not supposed to use it as such ever. Hence, we introduce a `SizedVoid` type, which is similar to `Void` (i.e., it has no inhabitants), but additionally carries a type-level size, which allows us to express the notion of "a pointer to a block of memory of a particular size that we will never use as a Haskell value, only manipulate directly through the pointer".
- Loading branch information
Showing
6 changed files
with
73 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters