#include <sys/mman.h>
#include <sys/types.h>
#include <unistd.h>
#include <cstdlib>
#include <cstring>
#include <optional>
#include <string>
#include "base/bits.h"
#include "base/check.h"
#include "base/command_line.h"
#include "base/files/file.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/memory/page_size.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/strings/stringprintf.h"
#include "base/thread_annotations.h"
#include "base/values.h"
#include "partition_alloc/buildflags.h"
#include "partition_alloc/in_slot_metadata.h"
#include "partition_alloc/partition_alloc_config.h"
#include "partition_alloc/partition_page.h"
#include "partition_alloc/partition_root.h"
#include "partition_alloc/thread_cache.h"
#include "third_party/snappy/src/snappy.h"
#include "tools/memory/partition_allocator/inspect_utils.h"
namespace partition_alloc::tools {
kInvalidBucketSize;
kSuperPageSize;
MetadataKind;
PartitionPageSize;
PartitionPageMetadata;
PartitionSuperPageExtentEntry;
SystemPageSize;
struct PageMapEntry { … };
static_assert …;
std::optional<PageMapEntry> EntryAtAddress(int pagemap_fd, uintptr_t address) { … }
class HeapDumper { … };
}
int main(int argc, char** argv) { … }