#ifdef UNSAFE_BUFFERS_BUILD
#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;
}
}