llvm/compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp

//===-- guarded_pool_allocator_posix.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 "gwp_asan/common.h"
#include "gwp_asan/guarded_pool_allocator.h"
#include "gwp_asan/platform_specific/guarded_pool_allocator_tls.h"
#include "gwp_asan/utilities.h"

#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <time.h>
#include <unistd.h>

#ifdef ANDROID
#include <sys/prctl.h>
#define PR_SET_VMA
#define PR_SET_VMA_ANON_NAME
#endif // ANDROID

namespace {
void MaybeSetMappingName(void *Mapping, size_t Size, const char *Name) {}
} // anonymous namespace

namespace gwp_asan {

void GuardedPoolAllocator::initPRNG() {}

void *GuardedPoolAllocator::map(size_t Size, const char *Name) const {}

void GuardedPoolAllocator::unmap(void *Ptr, size_t Size) const {}

void *GuardedPoolAllocator::reserveGuardedPool(size_t Size) {}

void GuardedPoolAllocator::unreserveGuardedPool() {}

void GuardedPoolAllocator::allocateInGuardedPool(void *Ptr, size_t Size) const {}

void GuardedPoolAllocator::deallocateInGuardedPool(void *Ptr,
                                                   size_t Size) const {}

size_t GuardedPoolAllocator::getPlatformPageSize() {}

void GuardedPoolAllocator::installAtFork() {}
} // namespace gwp_asan