29 lines
571 B
C++
29 lines
571 B
C++
/***
|
|
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: MemoryCrunch.hpp
|
|
Date: 2021-6-9 - 2023-08-10
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Debug
|
|
{
|
|
AUKN_SYM void AddMemoryCrunch();
|
|
AUKN_SYM void DecMemoryCrunch();
|
|
|
|
struct MemoryCrunch
|
|
{
|
|
inline MemoryCrunch()
|
|
{
|
|
AddMemoryCrunch();
|
|
}
|
|
|
|
inline ~MemoryCrunch()
|
|
{
|
|
DecMemoryCrunch();
|
|
}
|
|
};
|
|
|
|
#define AU_DEBUG_MEMCRUNCH Aurora::Debug::MemoryCrunch AU_CONCAT(__crunch, __COUNTER__);
|
|
} |