#include "src/tracing/ipc/posix_shared_memory.h"
#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || \
PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) || \
PERFETTO_BUILDFLAG(PERFETTO_OS_WASM)
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <memory>
#include <utility>
#include "perfetto/base/compiler.h"
#include "perfetto/base/logging.h"
#include "perfetto/ext/base/temp_file.h"
#include "src/tracing/ipc/memfd.h"
namespace perfetto {
namespace {
int kFileSeals = …;
}
std::unique_ptr<PosixSharedMemory> PosixSharedMemory::Create(size_t size) { … }
std::unique_ptr<PosixSharedMemory> PosixSharedMemory::AttachToFd(
base::ScopedFile fd,
bool require_seals_if_supported) { … }
std::unique_ptr<PosixSharedMemory> PosixSharedMemory::MapFD(base::ScopedFile fd,
size_t size) { … }
PosixSharedMemory::PosixSharedMemory(void* start,
size_t size,
base::ScopedFile fd)
: … { … }
PosixSharedMemory::~PosixSharedMemory() { … }
PosixSharedMemory::Factory::~Factory() { … }
std::unique_ptr<SharedMemory> PosixSharedMemory::Factory::CreateSharedMemory(
size_t size) { … }
}
#endif