mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 06:06:06 +00:00
[scudo] Provide allocator declaration
Ensure that extern allocator declaration is visible before definition Differential Revision: https://reviews.llvm.org/D121848
This commit is contained in:
parent
030d8262a6
commit
6ba8c8abe9
@ -21,8 +21,6 @@
|
||||
#define SCUDO_PREFIX(name) name
|
||||
#define SCUDO_ALLOCATOR Allocator
|
||||
|
||||
extern "C" void SCUDO_PREFIX(malloc_postinit)();
|
||||
|
||||
// Export the static allocator so that the C++ wrappers can access it.
|
||||
// Technically we could have a completely separated heap for C & C++ but in
|
||||
// reality the amount of cross pollination between the two is staggering.
|
||||
|
@ -54,4 +54,9 @@ struct __scudo_mallinfo2 {
|
||||
#define SCUDO_MALLINFO __scudo_mallinfo
|
||||
#endif
|
||||
|
||||
#if !SCUDO_ANDROID || !_BIONIC
|
||||
extern "C" void malloc_postinit();
|
||||
extern HIDDEN scudo::Allocator<scudo::Config, malloc_postinit> Allocator;
|
||||
#endif
|
||||
|
||||
#endif // SCUDO_WRAPPERS_C_H_
|
||||
|
@ -12,12 +12,10 @@
|
||||
#if !SCUDO_ANDROID || !_BIONIC
|
||||
|
||||
#include "allocator_config.h"
|
||||
#include "wrappers_c.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" void malloc_postinit();
|
||||
extern HIDDEN scudo::Allocator<scudo::Config, malloc_postinit> Allocator;
|
||||
|
||||
namespace std {
|
||||
struct nothrow_t {};
|
||||
enum class align_val_t : size_t {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user