#include "src/base/platform/platform-linux.h"
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/prctl.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <strings.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <sys/types.h>
#include <unistd.h>
#include <cmath>
#include <cstdio>
#include <memory>
#include <optional>
#include "src/base/logging.h"
#include "src/base/memory.h"
#undef MAP_TYPE
#include "src/base/macros.h"
#include "src/base/platform/platform-posix-time.h"
#include "src/base/platform/platform-posix.h"
#include "src/base/platform/platform.h"
namespace v8 {
namespace base {
TimezoneCache* OS::CreateTimezoneCache() { … }
void OS::SignalCodeMovingGC() { … }
void OS::AdjustSchedulingParams() { … }
void* OS::RemapShared(void* old_address, void* new_address, size_t size) { … }
std::optional<OS::MemoryRange> OS::GetFirstFreeMemoryRangeWithin(
OS::Address boundary_start, OS::Address boundary_end, size_t minimum_size,
size_t alignment) { … }
std::optional<MemoryRegion> MemoryRegion::FromMapsLine(const char* line) { … }
namespace {
std::unique_ptr<std::vector<MemoryRegion>> ParseProcSelfMaps(
FILE* fp, std::function<bool(const MemoryRegion&)> predicate,
bool early_stopping) { … }
MemoryRegion FindEnclosingMapping(uintptr_t target_start, size_t size) { … }
}
std::vector<OS::SharedLibraryAddress> GetSharedLibraryAddresses(FILE* fp) { … }
std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() { … }
bool OS::RemapPages(const void* address, size_t size, void* new_address,
MemoryPermission access) { … }
}
}