【CP】patch to opensource

This commit is contained in:
jg0
2021-07-23 18:36:23 +08:00
committed by wangzelin.wzl
parent 8160997f02
commit f2f91f98c6
23 changed files with 20418 additions and 20563 deletions

View File

@ -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 */