#include "base/memory/unsafe_shared_memory_pool.h"
#include "base/logging.h"
namespace {
constexpr size_t kMaxStoredBuffers = …;
}
namespace base {
UnsafeSharedMemoryPool::UnsafeSharedMemoryPool() = default;
UnsafeSharedMemoryPool::~UnsafeSharedMemoryPool() = default;
UnsafeSharedMemoryPool::Handle::Handle(
PassKey<UnsafeSharedMemoryPool>,
UnsafeSharedMemoryRegion region,
WritableSharedMemoryMapping mapping,
scoped_refptr<UnsafeSharedMemoryPool> pool)
: … { … }
UnsafeSharedMemoryPool::Handle::~Handle() { … }
const UnsafeSharedMemoryRegion& UnsafeSharedMemoryPool::Handle::GetRegion()
const { … }
const WritableSharedMemoryMapping& UnsafeSharedMemoryPool::Handle::GetMapping()
const { … }
std::unique_ptr<UnsafeSharedMemoryPool::Handle>
UnsafeSharedMemoryPool::MaybeAllocateBuffer(size_t region_size) { … }
void UnsafeSharedMemoryPool::Shutdown() { … }
void UnsafeSharedMemoryPool::ReleaseBuffer(
UnsafeSharedMemoryRegion region,
WritableSharedMemoryMapping mapping) { … }
}