#include "ipcz/buffer_pool.h"
#include <algorithm>
#include "ipcz/block_allocator_pool.h"
#include "third_party/abseil-cpp/absl/base/macros.h"
#include "third_party/abseil-cpp/absl/container/flat_hash_map.h"
#include "third_party/abseil-cpp/absl/numeric/bits.h"
#include "third_party/abseil-cpp/absl/synchronization/mutex.h"
namespace ipcz {
BufferPool::BufferPool() = default;
BufferPool::~BufferPool() = default;
Fragment BufferPool::GetFragment(const FragmentDescriptor& descriptor) { … }
bool BufferPool::AddBlockBuffer(
BufferId id,
DriverMemoryMapping mapping,
absl::Span<const BlockAllocator> block_allocators) { … }
size_t BufferPool::GetTotalBlockCapacity(size_t block_size) { … }
Fragment BufferPool::AllocateBlock(size_t block_size) { … }
Fragment BufferPool::AllocateBlockBestEffort(size_t preferred_block_size) { … }
bool BufferPool::FreeBlock(const Fragment& fragment) { … }
void BufferPool::WaitForBufferAsync(BufferId id,
WaitForBufferCallback callback) { … }
}