pub struct Allocator<LT: Lifetime> { /* private fields */ }
Expand description

The general purpose memory allocator. Implemented as a segregated list allocator.

Implementations

Creates a new allocator.

Safety

Caller needs to make sure that the provided instance and device are in a valid state.

Allocates memory for a buffer.

Safety

Caller needs to make sure that the provided device and buffer are in a valid state.

Allocates memory for an image. is_optimal must be set true if the image is a optimal image (a regular texture).

Safety

Caller needs to make sure that the provided device and image are in a valid state.

Allocates memory on the allocator.

Safety

Caller needs to make sure that the provided device is in a valid state.

Frees the allocation.

Safety

Caller needs to make sure that the allocation is not in use anymore and will not be used after being deallocated.

Releases all memory blocks back to the system. Should be called before drop.

Safety

Caller needs to make sure that no allocations are used anymore and will not being used after calling this function.

Number of allocations.

Number of unused ranges between allocations.

Number of bytes used by the allocations.

Number of bytes used by the unused ranges between allocations.

Number of allocated Vulkan memory blocks.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.