Conversation
Fix `ContiguousMemoryStorage::resize` return type Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Fix assume_stored returning a reference with invalid byte range. Reduce number of lock acquisitions in sync code. Fix push not handling alignment which caused the container to grow twice in some cases. Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Change base address representation Cleanup interface Improve documentation Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Simplify return types Improve resource management of implementations Improve docs and add examples Rename impl features Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Fix doc examples Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Add size function. Handle zero-sized element insertion better. Rename MemoryManager trait to ManageMemory. Improve docs and add more examples. Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Improve sync code and how locks are managed Apply clippy suggestions Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Separated on reference boundary so there's much unused implemented types/fns. Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Remove panics from AllocationTracker. Rename AllocationTracker to SegmentTracker which is clearer. Add supporting Location struct for peek_next to enforce validity of peeked result. Improve correctness of SegmentTracker implementation. Simplify use of SegmentTracker. Use peek_next in take_next to unify behavior. Add can_store fn to SegmentTracker to make checks cheaper. Improve SegmentTracker documentation. Rename current reserve methods on ContiguousMemory to reserve_exact and add reserve variants. Reduce code duplication in those methods. Reduce code duplication in some other parts of code. Improve error messages and documentation. Remove unused parts of types module and move some parts out. Move ManageMemory and DefaultMemoryManager out of raw module and into memory module. Fix ByteRange::aligned method to shrink the result instead of offseting it which is more correct. Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Fix introduced issues for different feature flags Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
This is a pre-removal of sync code. Turns out that it doesn't make much sense to internally control RwLocks and Mutex because in some cases users might require different types of access with different characteristics, so I believe a better approach would be making the core impl. as quick and simple as possible and then users of the library can wrap it in RwLock or Mutex as they see fit. Otherwise, implementation is super complicated and difficult to modify for those who aren't acquainted with the codebase. Given the permissive nature of the license, and how niche the synchronised use case is, I think it's a better choice to provide a simpler implementation which can then be re-vendored and modified to fit specific requirements if wrapping the structure in RwLock/Mutex isn't good enough. I'm pushing this for future reference, but most of the changes in this commit will be reverted. Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Opened up API to implementing custom state referencing and inner mutability which allows dependants to choose which syncronization mechanism their use case would benefit most from. Poisoning errors will cause reference getters to panic. Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Cleanup documentation. Remove some stale types. Simplify some methods. Fix no_std issues. Fix clippy warnings. Update github workflows. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
85c9ec6 to
70069f2
Compare
Update CI matrix to combine different features Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Move some tests into documentation Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Fix Layout import in examples Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
c746b2b to
e6c4569
Compare
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
- Cleanup documentation. - Fix some minor bugs. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
- Fix a bug where aligning a Range would in some cases cause its length to be negative. - Documentation improvements and fixes. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goals of this minor are:
Automatic sync specific code generationContiguousMemoryMemoryManagerinstead of default allocator for internalVecsno-stdsupport though that's... very hairy.