20#include "pw_allocator/allocator.h"
21#include "pw_allocator/block/tiny_block.h"
22#include "pw_allocator/first_fit.h"
23#include "pw_allocator/layout.h"
24#include "pw_bytes/span.h"
25#include "pw_containers/storage.h"
26#include "pw_multibuf/v1_adapter/chunk.h"
27#include "pw_multibuf/v1_adapter/internal/chunk_allocator.h"
28#include "pw_multibuf/v2/internal/entry.h"
30namespace pw::multibuf::v1_adapter {
41 using Base = internal::SingleChunkAllocator;
48 : Base(metadata_allocator_), metadata_allocator_(metadata_buffer_) {}
58 using Base::SetRegion;
60 ByteSpan Region()
const {
return Base::buffer(); }
63 std::optional<OwnedChunk>
GetChunk(
size_t size) {
64 return Base::AllocateChunk(size);
71 std::array<std::byte, kBufSize> metadata_buffer_{};
Definition: first_fit.h:41
Definition: single_chunk_region_tracker.h:39
SingleChunkRegionTracker(ByteSpan region)
Definition: single_chunk_region_tracker.h:52
SingleChunkRegionTracker()
Definition: single_chunk_region_tracker.h:47
std::optional< OwnedChunk > GetChunk(size_t size)
Definition: single_chunk_region_tracker.h:63