Pigweed
 
Loading...
Searching...
No Matches
pw::multibuf::MultiBufAllocatorAsync Class Reference

Public Member Functions

 MultiBufAllocatorAsync (MultiBufAllocator &mbuf_allocator)
 
 MultiBufAllocatorAsync (MultiBufAllocatorAsync &)=delete
 `MultiBufAllocatorAsync is not copyable or movable.
 
MultiBufAllocatorAsyncoperator= (MultiBufAllocatorAsync &)=delete
 
 MultiBufAllocatorAsync (MultiBufAllocatorAsync &&)=delete
 
MultiBufAllocatorAsyncoperator= (MultiBufAllocatorAsync &&)=delete
 
MultiBufAllocationFuture AllocateAsync (size_t size)
 
MultiBufAllocationFuture AllocateAsync (size_t min_size, size_t desired_size)
 
MultiBufAllocationFuture AllocateContiguousAsync (size_t size)
 
MultiBufAllocationFuture AllocateContiguousAsync (size_t min_size, size_t desired_size)
 

Member Function Documentation

◆ AllocateAsync() [1/2]

MultiBufAllocationFuture pw::multibuf::MultiBufAllocatorAsync::AllocateAsync ( size_t  min_size,
size_t  desired_size 
)

Asynchronously allocates a MultiBuf of at least min_size bytes and at most `desired_size bytes.

Memory allocated by an arbitrary MultiBufAllocator does not provide any alignment requirements, preferring instead to allow the allocator maximum flexibility for placing regions (especially discontiguous regions).

Return values
AMultiBufAllocationFuture which will yield a MultiBuf when one is available.

◆ AllocateAsync() [2/2]

MultiBufAllocationFuture pw::multibuf::MultiBufAllocatorAsync::AllocateAsync ( size_t  size)

Asynchronously allocates a MultiBuf of exactly size bytes.

Memory allocated by an arbitrary MultiBufAllocator does not provide any alignment requirements, preferring instead to allow the allocator maximum flexibility for placing regions (especially discontiguous regions).

Return values
AMultiBufAllocationFuture which will yield a MultiBuf when one is available.

◆ AllocateContiguousAsync() [1/2]

MultiBufAllocationFuture pw::multibuf::MultiBufAllocatorAsync::AllocateContiguousAsync ( size_t  min_size,
size_t  desired_size 
)

Asynchronously allocates an OwnedChunk of at least min_size bytes and at most desired_size bytes.

Return values
AMultiBufAllocationFuture which will yield an MultiBuf consisting of a single Chunk when one is available.

◆ AllocateContiguousAsync() [2/2]

MultiBufAllocationFuture pw::multibuf::MultiBufAllocatorAsync::AllocateContiguousAsync ( size_t  size)

Asynchronously allocates a contiguous MultiBuf of exactly size bytes.

Memory allocated by an arbitrary MultiBufAllocator does not provide any alignment requirements, preferring instead to allow the allocator maximum flexibility for placing regions (especially discontiguous regions).

Return values
AMultiBufAllocationFuture which will yield an MultiBuf consisting of a single Chunk when one is available.

The documentation for this class was generated from the following file: