// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef IPCZ_SRC_IPCZ_BUFFER_POOL_H_ #define IPCZ_SRC_IPCZ_BUFFER_POOL_H_ #include <cstdint> #include <map> #include <memory> #include "ipcz/block_allocator.h" #include "ipcz/buffer_id.h" #include "ipcz/driver_memory_mapping.h" #include "ipcz/fragment.h" #include "ipcz/fragment_descriptor.h" #include "third_party/abseil-cpp/absl/container/flat_hash_map.h" #include "third_party/abseil-cpp/absl/synchronization/mutex.h" #include "third_party/abseil-cpp/absl/types/span.h" namespace ipcz { class BlockAllocatorPool; // BufferPool maintains ownership of an extensible collection of mapped // DriverMemory buffers, exposing access to them for dynamic memory allocation // and arbitrary state sharing. Every buffer owned by a BufferPool is identified // by a unique BufferId, and once a buffer is added to the pool it remains there // indefinitely. // // BufferPool objects are thread-safe. class BufferPool { … }; } // namespace ipcz #endif // IPCZ_SRC_IPCZ_BUFFER_POOL_H_