chromium/components/gwp_asan/common/allocator_state.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/gwp_asan/common/allocator_state.h"

#include <algorithm>

#include "base/bits.h"
#include "base/logging.h"
#include "base/memory/page_size.h"
#include "base/strings/stringprintf.h"
#include "base/threading/platform_thread.h"
#include "build/build_config.h"

namespace gwp_asan {
namespace internal {

AllocatorState::AllocatorState() {}

AllocatorState::GetMetadataReturnType AllocatorState::GetMetadataForAddress(
    uintptr_t exception_address,
    const SlotMetadata* metadata_arr,
    const MetadataIdx* slot_to_metadata,
    MetadataIdx* metadata_idx,
    std::string* error) const {}

bool AllocatorState::IsValid() const {}

uintptr_t AllocatorState::GetPageAddr(uintptr_t addr) const {}

uintptr_t AllocatorState::GetNearestValidPage(uintptr_t addr) const {}

AllocatorState::SlotIdx AllocatorState::GetNearestSlot(uintptr_t addr) const {}

AllocatorState::ErrorType AllocatorState::GetErrorType(uintptr_t addr,
                                                       bool allocated,
                                                       bool deallocated) const {}

uintptr_t AllocatorState::SlotToAddr(AllocatorState::SlotIdx slot) const {}

AllocatorState::SlotIdx AllocatorState::AddrToSlot(uintptr_t addr) const {}

AllocatorState::SlotMetadata::SlotMetadata() = default;

}  // namespace internal
}  // namespace gwp_asan