#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "partition_alloc/partition_alloc_base/debug/proc_maps_linux.h"
#include <fcntl.h>
#include <stddef.h>
#include "partition_alloc/build_config.h"
#include "partition_alloc/partition_alloc_base/files/file_util.h"
#include "partition_alloc/partition_alloc_base/logging.h"
#include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h"
#include "partition_alloc/partition_alloc_check.h"
#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || \
PA_BUILDFLAG(IS_ANDROID)
#include <inttypes.h>
#endif
namespace partition_alloc::internal::base::debug {
namespace {
int OpenFile(const char* pathname, int flags) { … }
}
static bool ContainsGateVMA(std::string* proc_maps, size_t pos) { … }
bool ReadProcMaps(std::string* proc_maps) { … }
bool ParseProcMaps(const std::string& input,
std::vector<MappedMemoryRegion>* regions_out) { … }
}