Expand description
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.
Modulesยง
- allocator ๐
 - block ๐
 - buddy ๐
 - config ๐
 - error ๐
 - freelist ๐
 - heap ๐
 - slab ๐
 - usage ๐
 - util ๐
 
Macrosยง
- report_
error_ ๐on_ drop  
Structsยง
- Allocation
Flags  - Allocation flags
 - Config
 - Configuration for 
GpuAllocator - Device
Properties  - Properties of the device that will be used for allocating memory objects.
 - GpuAllocator
 - Memory allocator for Vulkan-like APIs.
 - Mapped
Memory Range  - Specifies range of the mapped memory region.
 - Memory
Block  - Memory block allocated by 
GpuAllocator. - Memory
Heap  - Defines memory heap.
 - Memory
Property Flags  - Memory properties type.
 - Memory
Type  - Defines memory type.
 - Request
 - Memory request for allocator.
 - Usage
Flags  - Memory usage type. Bits set define intended usage for requested memory.
 
Enumsยง
- Allocation
Error  - Enumeration of possible errors that may occur during memory allocation.
 - Dedicated
 - Hints for allocator to decide on allocation strategy.
 - Device
MapError  - Memory mapped error.
 - MapError
 - Enumeration of possible errors that may occur during memory mapping.
 - OutOf
Memory  - Memory exhausted error.
 
Traitsยง
- Memory
Device  - Abstract device that can be used to allocate memory objects.
 
Functionsยง
- align_
down ๐ - Align 
valuedown toalign_maskReturns largest integer not bigger thanvaluealigned byalign_mask. - align_
up ๐ - Aligns 
valueup toalign_maskReturns smallest integer not lesser thanvaluealigned byalign_mask. ReturnsNoneon overflow. - unreachable_
unchecked ๐ โ