Conversation
…@v6 and rand v0.10
…s; update documentation and examples
- Consolidated slab allocator benchmarks into a single file, removing redundant code and improving organization. - Removed the stability.rs file, which contained stress tests that are now integrated into the stress_test.rs file. - Introduced a new stress_test.rs file to handle various stress scenarios, including random mixed allocations, exhaustion recovery, and fragmentation recovery. - Updated README.md to reflect changes in the test structure and added instructions for running stress tests. - Removed the test_composite_page_allocator_alloc_at function from integration_test.rs as it was not providing meaningful validation.
…omponents; simplify allocation logic
- Introduced a MockOs struct to simulate CPU context switching in tests. - Updated integration tests to use the new MockOs for cross-CPU allocation and deallocation scenarios. - Refactored memory allocation and deallocation functions for better clarity and reuse. - Enhanced stress tests to utilize the MockOs for simulating multi-CPU environments. - Improved error handling and assertions in tests to ensure robustness. - Removed redundant code and comments for cleaner test files.
- Updated integration tests to use BuddyAllocator and SlabAllocator. - Replaced MockOs with TestOs for better clarity in test context. - Simplified memory allocation and deallocation functions. - Enhanced test cases for buddy allocator, including basic allocation, alignment, exhaustion recovery, and fragmentation recovery. - Improved stress tests to ensure allocator stability and recovery from exhaustion. - Removed unused code and comments for better readability.
…alization - Updated benchmarks in `benches/slab_allocator.rs` to use the `divan` framework, simplifying the allocation and deallocation logic. - Removed redundant code and improved clarity in benchmark functions for size class allocation, hot reuse, mixed size batch, and steady state recycling. - Enhanced the `GlobalAllocator` in `src/global.rs` to manage metadata layout more effectively, ensuring proper alignment and size calculations. - Modified the `BuddyAllocator` to enforce stricter checks during deallocation, ensuring that the correct block sizes are freed. - Improved error handling in tests to validate allocator behavior under various conditions, including unaligned region starts and insufficient managed pages. - Cleaned up memory allocation and deallocation logic in stress tests, removing unnecessary metadata handling.
…ees and add integration tests for cross-CPU deallocation
…ead of separate start and size parameters
- Removed the MockOs struct and its implementation, simplifying the test setup. - Introduced HostRegion for managing heap memory in tests. - Updated allocation and deallocation logic to use usize pointers instead of NonNull. - Added multithreaded stress tests for mixed allocation/freeing, remote freeing, page allocation/freeing, fragmentation recovery, and exhaustion recovery. - Enhanced assertions to check for recovery with cached slabs. - Improved random allocation logic and CPU management in tests.
- Introduced `BuddySection` and `ManagedSection` to manage multiple memory regions. - Updated `GlobalAllocator` to compute and manage metadata for multiple sections. - Modified allocation and deallocation methods to work with sections. - Enhanced tests to validate behavior with multiple regions, including allocation, deallocation, and memory management. - Added stress tests for concurrent allocation and region addition.
…Spec for better clarity and maintainability
…ersion bump to 0.3.0 refactor: improve import order and formatting across benchmark and test files
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.
No description provided.