Traverse-Research / Traverse-Research/gpu-allocator
Allocator type is quite large
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 497
- Forks
- 82
- Avg merge
- 18d 17h
- Merged PRs (30d)
- 1
Description
The allocator type is quite large. This is due to holding a ash::Device.
Summary of -Z print-type-sizes (cargo +nightly rustc -- -Z print-type-sizes):
print-type-size type: `gpu_allocator::vulkan::Allocator`: 1552 bytes, alignment: 8 bytes
print-type-size field `.device`: 1488 bytes
print-type-size field `.buffer_image_granularity`: 8 bytes
print-type-size field `.memory_types`: 24 bytes
print-type-size field `.memory_heaps`: 24 bytes
print-type-size field `.debug_settings`: 6 bytes
print-type-size end padding: 2 bytes
A possible solution could be to hold an ash::vk::Device handle and then load the function pointers the allocator uses.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the gpu_allocator::vulkan::Allocator layout and run cargo +nightly rustc -- -Z print-type-sizes to measure the device field. Investigate the proposed ash::vk::Device handle and function-pointer approach; done means reducing the allocator size without breaking its Vulkan behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100