chromium/third_party/ipcz/src/ipcz/block_allocator.cc

// 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.

#include "ipcz/block_allocator.h"

#include <array>
#include <atomic>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <limits>
#include <thread>

#include "ipcz/ipcz.h"
#include "third_party/abseil-cpp/absl/base/macros.h"
#include "util/safe_math.h"

namespace ipcz {

namespace {

constexpr int16_t kFrontBlockIndex =;

// Helper for legibility of relative/absolute index conversions.
struct ForBaseIndex {};

}  // namespace

BlockAllocator::BlockAllocator() = default;
BlockAllocator::BlockAllocator(absl::Span<uint8_t> region, uint32_t block_size)
    :{}

BlockAllocator::BlockAllocator(const BlockAllocator&) = default;

BlockAllocator& BlockAllocator::operator=(const BlockAllocator&) = default;

BlockAllocator::~BlockAllocator() = default;

void BlockAllocator::InitializeRegion() const {}

void* BlockAllocator::Allocate() const {}

bool BlockAllocator::Free(void* ptr) const {}

bool BlockAllocator::TryUpdateFrontHeader(BlockHeader& last_known_header,
                                          int16_t first_free_block) const {}

BlockAllocator::FreeBlock::FreeBlock(int16_t index, AtomicBlockHeader& header)
    :{}

void BlockAllocator::FreeBlock::SetNextFreeBlock(int16_t next_free_block) {}

}  // namespace ipcz