Skip to main content

Module memory

Module memory 

Source
Expand description

Checked memory selection, separate storage and explicit pooled buffers.

Allocator operations do not submit or wait. GPU completion, resource destruction and host/GPU access ordering remain caller responsibilities.

Re-exports§

pub use virtual_block::PlacementStrategy;
pub use virtual_block::VirtualAllocation;
pub use virtual_block::VirtualAllocationInfo;
pub use virtual_block::VirtualBlock;
pub use virtual_block::VirtualBlockStats;

Modules§

virtual_block
Host-only region placement over an integer byte range.

Structs§

AllocRequest
Allocation
One live native region. No implicit free, unmap, submission or wait in Drop.
AllocationCreateInfo
Managed-buffer policy; not a Vulkan ABI record or an arbitrary allocation chain.
Allocator
Borrows one device; native memory is released only by explicit operations.
AllocatorStats
Local accounting snapshot; excludes allocations made by other allocators/raw calls.
MemoryTypeSelector
Validated device memory properties and non-coherent atom size.

Enums§

AllocError
AllocationPolicy
Buffer storage policy. Required or preferred native dedication takes precedence.

Functions§

allocate⚠
Allocate separate native storage with no advanced allocation chain.
close
Checked shutdown after all regions and their blocks have been explicitly released.
create_buffer⚠
Transactionally create, query, allocate and bind an ordinary buffer.
create_buffer_with_options⚠
Create, allocate, optionally map and bind an ordinary buffer transactionally.
destroy_buffer⚠
Destroy a checked managed resource pair in buffer-before-memory order.
flush⚠
Flush a bounded allocation-relative mapped range, observing atom/end rules.
free⚠
Release a separate allocation or pooled placement and invalidate its token.
invalidate⚠
Invalidate a bounded allocation-relative mapped range; never waits for the GPU.
map⚠
Map one allocation. Distinct regions share a reference-counted block mapping. Repeated explicit maps of the same region return AlreadyMapped.
mapped_pointer
Return a region pointer only if that region has an explicit or persistent hold. Does not map, acquire a hold, synchronize, or authorize pointer dereferences.
statistics
Calculate local live-region/native-block accounting without querying the driver.
unmap⚠
Release one explicit map; persistent holds and other regions remain mapped.