【CP】patch to opensource
This commit is contained in:
25
deps/oblib/src/lib/alloc/malloc_hook.h
vendored
25
deps/oblib/src/lib/alloc/malloc_hook.h
vendored
@ -12,29 +12,6 @@
|
||||
|
||||
#ifndef MALLOC_HOOK_H
|
||||
#define MALLOC_HOOK_H
|
||||
#include <cstddef>
|
||||
#include "lib/coro/co_var.h"
|
||||
|
||||
namespace oceanbase {
|
||||
namespace lib {
|
||||
extern int64_t memalign_size;
|
||||
static const uint32_t HOOK_MAGIC_CODE = 0XA1B2C3D4;
|
||||
struct HookHeader {
|
||||
HookHeader() : MAGIC_CODE_(HOOK_MAGIC_CODE), from_glibc_(0), offset_(0)
|
||||
{}
|
||||
uint32_t MAGIC_CODE_;
|
||||
uint32_t data_size_;
|
||||
uint8_t from_glibc_;
|
||||
uint64_t offset_;
|
||||
char padding__[8];
|
||||
char data_[0];
|
||||
} __attribute__((aligned(16)));
|
||||
|
||||
static const uint32_t HOOK_HEADER_SIZE = offsetof(HookHeader, data_);
|
||||
|
||||
enum GLIBC_HOOK_OPT { GHO_NOHOOK, GHO_HOOK, GHO_NONULL };
|
||||
extern RLOCAL(int, glibc_hook_opt);
|
||||
} // namespace lib
|
||||
} // namespace oceanbase
|
||||
extern void init_malloc_hook();
|
||||
|
||||
#endif /* MALLOC_HOOK_H */
|
||||
|
||||
Reference in New Issue
Block a user