llvm/compiler-rt/lib/scudo/standalone/mem_map_linux.cpp

//===-- mem_map_linux.cpp ---------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#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
// TODO(chiahungduan): Review if we still need the followings macros.
#include <sys/prctl.h>
// Definitions of prctl arguments to set a vma name in Android kernels.
#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) {}

} // namespace scudo

#endif // SCUDO_LINUX