#include "gwp_asan/guarded_pool_allocator.h"
#include "gwp_asan/crash_handler.h"
#include "gwp_asan/options.h"
#include "gwp_asan/utilities.h"
#include <assert.h>
#include <stddef.h>
AllocationMetadata;
Error;
namespace gwp_asan {
namespace {
GuardedPoolAllocator *SingletonPtr = …;
size_t roundUpTo(size_t Size, size_t Boundary) { … }
uintptr_t getPageAddr(uintptr_t Ptr, uintptr_t PageSize) { … }
bool isPowerOfTwo(uintptr_t X) { … }
}
GuardedPoolAllocator *GuardedPoolAllocator::getSingleton() { … }
void GuardedPoolAllocator::init(const options::Options &Opts) { … }
void GuardedPoolAllocator::disable() { … }
void GuardedPoolAllocator::enable() { … }
void GuardedPoolAllocator::iterate(void *Base, size_t Size, iterate_callback Cb,
void *Arg) { … }
void GuardedPoolAllocator::uninitTestOnly() { … }
size_t GuardedPoolAllocator::getRequiredBackingSize(size_t Size,
size_t Alignment,
size_t PageSize) { … }
uintptr_t GuardedPoolAllocator::alignUp(uintptr_t Ptr, size_t Alignment) { … }
uintptr_t GuardedPoolAllocator::alignDown(uintptr_t Ptr, size_t Alignment) { … }
void *GuardedPoolAllocator::allocate(size_t Size, size_t Alignment) { … }
void GuardedPoolAllocator::raiseInternallyDetectedError(uintptr_t Address,
Error E) { … }
void GuardedPoolAllocator::deallocate(void *Ptr) { … }
static bool PreviousRecursiveGuard;
void GuardedPoolAllocator::preCrashReport(void *Ptr) { … }
void GuardedPoolAllocator::postCrashReportRecoverableOnly(void *SignalPtr) { … }
size_t GuardedPoolAllocator::getSize(const void *Ptr) { … }
AllocationMetadata *GuardedPoolAllocator::addrToMetadata(uintptr_t Ptr) const { … }
size_t GuardedPoolAllocator::reserveSlot() { … }
void GuardedPoolAllocator::freeSlot(size_t SlotIndex) { … }
uint32_t GuardedPoolAllocator::getRandomUnsigned32() { … }
}