#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
namespace {
void MaybeSetMappingName(void *Mapping, size_t Size, const char *Name) { … }
}
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() { … }
}