-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce MemoryPoolChunk.Slot to improve safety and simplify the Mem…
…oryPool MemoryPoolChunk.Slot is introduced in order to encapsulate access to a slot. This leads to cleaner code in SegmentWithMemoryPool as it no longer needs to manage slotOffset information and weave that between the chunk and MemoryPoolAddress. The result is significantly safer as well, the slot offset is hidden inside the Slot and can not accidentally cause out of bounds access. This reduces the number of places we have to validate the offset in a typical operation which may improve performance slightly as well, and if not at least decreases the exception paths to test.
- Loading branch information
Scott Carey
committed
Dec 6, 2019
1 parent
e20a6e0
commit c3b61ca
Showing
4 changed files
with
277 additions
and
236 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
Oops, something went wrong.