Struct inserted at the end of every allocation.
More...
#include <TMemoryTracing.hpp>
|
| MagicBlock (const char *f, int l, void *p, size_t s) |
|
Struct inserted at the end of every allocation.
Definition at line 47 of file TMemoryTracing.hpp.
◆ MagicBlock()
tklb::memory::tracer::MagicBlock::MagicBlock |
( |
const char * |
f, |
|
|
int |
l, |
|
|
void * |
p, |
|
|
size_t |
s |
|
) |
| |
|
inline |
Definition at line 55 of file TMemoryTracing.hpp.
constexpr char TKLB_MAGIC_BACKUP_STRING[]
constexpr char TKLB_MAGIC_STRING[]
static void set(void *dst, const unsigned char val, size_t size)
memset wrapper
static void copy(void *dst, const void *src, const size_t size)
memcpy wrapper
char magicBackup[sizeof(TKLB_MAGIC_BACKUP_STRING)]
char magic[sizeof(TKLB_MAGIC_STRING)]
◆ check()
static void tklb::memory::tracer::MagicBlock::check |
( |
MagicBlock * |
block | ) |
|
|
inlinestatic |
checks if the allocation is still intact
Definition at line 90 of file TMemoryTracing.hpp.
#define TKLB_ASSERT(condition)
Wrap assertions.
static bool compare(const char *a, const char *b, size_t s)
◆ compare()
static bool tklb::memory::tracer::MagicBlock::compare |
( |
const char * |
a, |
|
|
const char * |
b, |
|
|
size_t |
s |
|
) |
| |
|
inlinestatic |
◆ construct()
static void tklb::memory::tracer::MagicBlock::construct |
( |
void * |
ptr, |
|
|
size_t |
s, |
|
|
const char * |
f, |
|
|
int |
l |
|
) |
| |
|
inlinestatic |
Placement new at the end of the allocation.
Definition at line 68 of file TMemoryTracing.hpp.
69 if (
ptr ==
nullptr) {
return; }
HeapBuffer< MagicBlock * > MagicBlocks
MagicBlock(const char *f, int l, void *p, size_t s)
◆ destroy()
static void tklb::memory::tracer::MagicBlock::destroy |
( |
void * |
start | ) |
|
|
inlinestatic |
Definition at line 114 of file TMemoryTracing.hpp.
115 if (start ==
nullptr) {
return; }
static MagicBlock * find(void *start)
Find the MagicBlock for a given allocation.
static void check(MagicBlock *block)
checks if the allocation is still intact
◆ find()
static MagicBlock * tklb::memory::tracer::MagicBlock::find |
( |
void * |
start | ) |
|
|
inlinestatic |
◆ file
const char* tklb::memory::tracer::MagicBlock::file |
◆ line
int tklb::memory::tracer::MagicBlock::line |
◆ magic
◆ magicBackup
◆ padding
char tklb::memory::tracer::MagicBlock::padding[1000] |
◆ ptr
void* tklb::memory::tracer::MagicBlock::ptr |
◆ size
size_t tklb::memory::tracer::MagicBlock::size |
The documentation for this struct was generated from the following file: