Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Suballocator::suballocations #2499

Merged
merged 4 commits into from
Mar 16, 2024

Conversation

marc0246
Copy link
Contributor

This allows the user to display debug information about individual memory blocks internal to the allocator. MemoryAllocator isn't integrated into this yet. This unfortunately required me to change Suballocator::allocate and Suballocator::deallocate to take &mut self, which makes it a bit more inconvenient to work with in many cases. But alas, the alternative would have been to keep the internal mutability but change it to a RefCell, and I'm not a fan of internal synchronization if it can be helped. It just means that the user will have to put the RefCell externally if needed.

Changelog:

### Breaking changes
Changes to memory allocation:
- `Suballocator::{allocate,deallocate}` now take `&mut self`.
- `Suballocator` has new required items `Suballocations` and `suballocations` for iterating over suballocations.

@Rua Rua merged commit 984cbeb into vulkano-rs:master Mar 16, 2024
5 checks passed
Rua added a commit that referenced this pull request Mar 16, 2024
@marc0246 marc0246 deleted the suballocation-iteration branch March 16, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants