#memory-allocator #vulkan #memory-object #graphics-api #gpu #allocation

no-std gpu-alloc

Implementation agnostic memory allocator for Vulkan like APIs

13 releases

0.6.0 May 30, 2023
0.5.3 Jan 19, 2022
0.5.2 Sep 24, 2021
0.4.7 May 22, 2021
0.2.0 Nov 13, 2020

#43 in Memory management

Download history 57794/week @ 2024-08-02 71508/week @ 2024-08-09 55944/week @ 2024-08-16 63390/week @ 2024-08-23 63231/week @ 2024-08-30 60974/week @ 2024-09-06 59501/week @ 2024-09-13 62485/week @ 2024-09-20 63260/week @ 2024-09-27 65823/week @ 2024-10-04 63588/week @ 2024-10-11 58434/week @ 2024-10-18 62650/week @ 2024-10-25 66605/week @ 2024-11-01 59996/week @ 2024-11-08 66122/week @ 2024-11-15

264,924 downloads per month
Used in 1,703 crates (7 directly)

MIT/Apache

105KB
2K SLoC

gpu-alloc

crates docs actions MIT/Apache loc

Implementation agnostic memory allocator for Vulkan like APIs.

This crate is intended to be used as part of safe API implementations.
Use with caution. There are unsafe functions all over the place.

Usage

Start with fetching DeviceProperties from gpu-alloc-<backend> crate for the backend of choice.
Then create GpuAllocator instance and use it for all device memory allocations.
GpuAllocator will take care for all necessary bookkeeping like memory object count limit, heap budget and memory mapping.

Backends implementations

Backend supporting crates should not depend on this crate.
Instead they should depend on gpu-alloc-types which is much more stable, allowing to upgrade gpu-alloc version without gpu-alloc-<backend> upgrade.

Supported Rust Versions

The minimum supported version is 1.40. The current version is not guaranteed to build on Rust versions earlier than the minimum supported version.

gpu-alloc-erupt crate requires version 1.48 or higher due to dependency on erupt crate.

License

Licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Donate

Become a patron

Dependencies

~73–345KB