Pigweed
 
Loading...
Searching...
No Matches
pw::multibuf::test::SimpleAllocatorForTest< kDataSizeBytes, kMetaSizeBytes > Class Template Reference

Simple, self-contained pw::multibuf::MultiBufAllocator for test use. More...

#include <simple_allocator_for_test.h>

Inheritance diagram for pw::multibuf::test::SimpleAllocatorForTest< kDataSizeBytes, kMetaSizeBytes >:
pw::multibuf::SimpleAllocator pw::multibuf::MultiBufAllocator

Public Member Functions

MultiBuf BufWith (std::initializer_list< std::byte > data)
 Allocates a MultiBuf and initializes its contents to the provided data.
 
- Public Member Functions inherited from pw::multibuf::SimpleAllocator
 SimpleAllocator (ByteSpan data_area, pw::allocator::Allocator &metadata_alloc, size_t alignment=1)
 
- Public Member Functions inherited from pw::multibuf::MultiBufAllocator
 MultiBufAllocator (MultiBufAllocator &)=delete
 `MultiBufAllocator is not copyable or movable.
 
MultiBufAllocatoroperator= (MultiBufAllocator &)=delete
 
 MultiBufAllocator (MultiBufAllocator &&)=delete
 
MultiBufAllocatoroperator= (MultiBufAllocator &&)=delete
 
std::optional< MultiBufAllocate (size_t size)
 
std::optional< MultiBufAllocate (size_t min_size, size_t desired_size)
 
std::optional< MultiBufAllocateContiguous (size_t size)
 
std::optional< MultiBufAllocateContiguous (size_t min_size, size_t desired_size)
 
std::optional< size_t > GetBackingCapacity ()
 

Static Public Member Functions

static constexpr size_t data_size_bytes ()
 Size of the data area.
 

Additional Inherited Members

- Protected Member Functions inherited from pw::multibuf::MultiBufAllocator
void MoreMemoryAvailable (size_t size_available, size_t contiguous_size_available)
 

Detailed Description

template<size_t kDataSizeBytes = 1024, size_t kMetaSizeBytes = kDataSizeBytes>
class pw::multibuf::test::SimpleAllocatorForTest< kDataSizeBytes, kMetaSizeBytes >

Simple, self-contained pw::multibuf::MultiBufAllocator for test use.


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