1 inline void NoBoundsChecking::guardFront(
void*,
size_t)
const {}
2 inline void NoBoundsChecking::guardBack(
void*,
size_t)
const {}
4 inline void NoBoundsChecking::checkFront(
void*,
size_t)
const {}
5 inline void NoBoundsChecking::checkBack(
void*,
size_t)
const {}
7 inline void SimpleBoundsChecking::guardFront(
void* ptr,
size_t)
const {
8 std::memcpy(ptr, SimpleBoundsChecking::MagicFront, SimpleBoundsChecking::SizeFront);
11 inline void SimpleBoundsChecking::guardBack(
void* ptr,
size_t size)
const {
12 std::memcpy(static_cast<char*>(ptr) + size - SimpleBoundsChecking::SizeBack, SimpleBoundsChecking::MagicBack, SimpleBoundsChecking::SizeBack);
15 inline void SimpleBoundsChecking::checkFront(
void* ptr,
size_t)
const {
20 std::memcmp(ptr, SimpleBoundsChecking::MagicFront, SimpleBoundsChecking::SizeFront) == 0,
21 "Memory overwrite at front of the user buffer" 25 inline void SimpleBoundsChecking::checkBack(
void* ptr,
size_t size)
const {
31 std::memcmp(static_cast<char*>(ptr) + size - SimpleBoundsChecking::SizeBack, SimpleBoundsChecking::MagicBack, SimpleBoundsChecking::SizeBack) == 0,
32 "Memory overwrite at back of the user buffer" #define LUG_ASSERT(assertion, message)