llvm/compiler-rt/lib/memprof/memprof_allocator.cpp

//===-- memprof_allocator.cpp --------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// This file is a part of MemProfiler, a memory profiler.
//
// Implementation of MemProf's memory allocator, which uses the allocator
// from sanitizer_common.
//
//===----------------------------------------------------------------------===//

#include "memprof_allocator.h"
#include "memprof_mapping.h"
#include "memprof_mibmap.h"
#include "memprof_rawprofile.h"
#include "memprof_stack.h"
#include "memprof_thread.h"
#include "profile/MemProfData.inc"
#include "sanitizer_common/sanitizer_allocator_checks.h"
#include "sanitizer_common/sanitizer_allocator_interface.h"
#include "sanitizer_common/sanitizer_allocator_report.h"
#include "sanitizer_common/sanitizer_array_ref.h"
#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_errno.h"
#include "sanitizer_common/sanitizer_file.h"
#include "sanitizer_common/sanitizer_flags.h"
#include "sanitizer_common/sanitizer_internal_defs.h"
#include "sanitizer_common/sanitizer_stackdepot.h"

#include <sched.h>
#include <time.h>

#define MAX_HISTOGRAM_PRINT_SIZE

extern bool __memprof_histogram;

__memprof // namespace __memprof

// ---------------------- Interface ---------------- {{{1
usingnamespace__memprof;

uptr __sanitizer_get_estimated_allocated_size(uptr size) {}

int __sanitizer_get_ownership(const void *p) {}

const void *__sanitizer_get_allocated_begin(const void *p) {}

uptr __sanitizer_get_allocated_size(const void *p) {}

uptr __sanitizer_get_allocated_size_fast(const void *p) {}

void __sanitizer_purge_allocator() {}

int __memprof_profile_dump() {}

void __memprof_profile_reset() {}