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

Enhancement: Always Round Up For Unknown Suballocation Types #449

Open
CannibalVox opened this issue Sep 6, 2024 · 0 comments
Open

Enhancement: Always Round Up For Unknown Suballocation Types #449

CannibalVox opened this issue Sep 6, 2024 · 0 comments
Labels
investigating Still to be determined whether we work on this quality Code quality improvement e.g. refactoring

Comments

@CannibalVox
Copy link

VmaBlockBufferImageGranularity::RoundupAllocRequest will cause an allocation to stretch to occupy the entirety of the buffer image granularity "slots" it is located in, if bufferimagegranularity is relatively small (less than 256 bytes).

This seems like a fine attitude for suballocations of type VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL, which may share "slots" with other suballocations of the same type. However, for types VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN and VMA_SUBALLOCATION_TYPE_UNKNOWN, the suballocations may never share their "slots" with other allocations under any circumstances. As a result, NOT stretching the suballocations doesn't really accomplish anything except add friction to locating a good spot to allocate and create "dead" free blocks that can't be used for anything. If many of these suballocation types exist, these dead blocks can add an inordinate amount of time to defragmentation passes.

Since the additional free blocks don't serve any purpose, I think that RoundUp should always round up for those two suballocation types when the granularity is >1.

@adam-sawicki-a adam-sawicki-a added investigating Still to be determined whether we work on this quality Code quality improvement e.g. refactoring labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating Still to be determined whether we work on this quality Code quality improvement e.g. refactoring
Projects
None yet
Development

No branches or pull requests

2 participants