[Clang][SME2] Enable multi-vector loads & stores for SME2 (#75821)
[llvm-project.git] / compiler-rt / lib / scudo / standalone / wrappers_c.cpp
blob60014a0f66bf541fdc8f168e70543fdc38a7d8b4
1 //===-- wrappers_c.cpp ------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "platform.h"
11 // Skip this compilation unit if compiled as part of Bionic.
12 #if !SCUDO_ANDROID || !_BIONIC
14 #include "allocator_config.h"
15 #include "internal_defs.h"
16 #include "platform.h"
17 #include "scudo/interface.h"
18 #include "wrappers_c.h"
19 #include "wrappers_c_checks.h"
21 #include <stdint.h>
22 #include <stdio.h>
24 #define SCUDO_PREFIX(name) name
25 #define SCUDO_ALLOCATOR Allocator
27 // Export the static allocator so that the C++ wrappers can access it.
28 // Technically we could have a completely separated heap for C & C++ but in
29 // reality the amount of cross pollination between the two is staggering.
30 SCUDO_REQUIRE_CONSTANT_INITIALIZATION
31 scudo::Allocator<scudo::Config, SCUDO_PREFIX(malloc_postinit)> SCUDO_ALLOCATOR;
33 #include "wrappers_c.inc"
35 #undef SCUDO_ALLOCATOR
36 #undef SCUDO_PREFIX
38 extern "C" INTERFACE void __scudo_print_stats(void) { Allocator.printStats(); }
40 #endif // !SCUDO_ANDROID || !_BIONIC