================ @@ -0,0 +1,315 @@ +//===-- copyprof_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 implements the standalone memory allocator for CopyProf, managing +/// internal dynamic allocations required during profiling. +/// +//===----------------------------------------------------------------------===// + +#include "copyprof_allocator.h" + +#include <pthread.h> + +#include "copyprof_interceptors.h" +#include "copyprof_interface_internal.h" +#include "copyprof_per_object_state.h" +#include "copyprof_shadow.h" +#include "copyprof_state.h" +#include "sanitizer_common/sanitizer_allocator.h" +#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_common.h" +#include "sanitizer_common/sanitizer_errno.h" +#include "sanitizer_common/sanitizer_flags.h" +#include "sanitizer_common/sanitizer_internal_defs.h" +#include "sanitizer_common/sanitizer_platform_limits_posix.h" +#include "sanitizer_common/sanitizer_stacktrace.h" + +namespace __copyprof { +namespace { + +using namespace __sanitizer; + +struct CopyProfMapUnmapCallback { + void OnMap(uptr p, uptr size) const {} + void OnMapSecondary(uptr p, uptr size, uptr user_begin, ---------------- snehasish wrote:
Could you add a comment for these? What is the secondary one? https://github.com/llvm/llvm-project/pull/232851 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
