#include "platform.h"
#if SCUDO_LINUX
#include "mem_map_linux.h"
#include "common.h"
#include "internal_defs.h"
#include "linux.h"
#include "mutex.h"
#include "report_linux.h"
#include "string_utils.h"
#include <errno.h>
#include <fcntl.h>
#include <linux/futex.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#if SCUDO_ANDROID
#include <sys/prctl.h>
#define ANDROID_PR_SET_VMA …
#define ANDROID_PR_SET_VMA_ANON_NAME …
#endif
namespace scudo {
static void *mmapWrapper(uptr Addr, uptr Size, const char *Name, uptr Flags) { … }
bool MemMapLinux::mapImpl(uptr Addr, uptr Size, const char *Name, uptr Flags) { … }
void MemMapLinux::unmapImpl(uptr Addr, uptr Size) { … }
bool MemMapLinux::remapImpl(uptr Addr, uptr Size, const char *Name,
uptr Flags) { … }
void MemMapLinux::setMemoryPermissionImpl(uptr Addr, uptr Size, uptr Flags) { … }
void MemMapLinux::releaseAndZeroPagesToOSImpl(uptr From, uptr Size) { … }
bool ReservedMemoryLinux::createImpl(uptr Addr, uptr Size, const char *Name,
uptr Flags) { … }
void ReservedMemoryLinux::releaseImpl() { … }
ReservedMemoryLinux::MemMapT ReservedMemoryLinux::dispatchImpl(uptr Addr,
uptr Size) { … }
}
#endif